!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@wix/image-kit"),require("react"),require("react-dom")):"function"==typeof define&&define.amd?define("rb_wixui.thunderbolt[VideoPlayer]",["imageClientApi","react","reactDOM"],t):"object"==typeof exports?exports["rb_wixui.thunderbolt[VideoPlayer]"]=t(require("@wix/image-kit"),require("react"),require("react-dom")):e["rb_wixui.thunderbolt[VideoPlayer]"]=t(e.__imageClientApi__,e.React,e.ReactDOM)}("undefined"!=typeof self?self:this,(function(e,t,n){return function(){var o={1835:function(e,t,n){var o=n(82016);e.exports=o.create("PlayableCover847694237",{classes:{root:"PlayableCover847694237__root",responsiveMode:"PlayableCover847694237__responsiveMode",overlay:"PlayableCover847694237__overlay",title:"PlayableCover847694237__title",poster:"PlayableCover847694237__poster",playButton:"PlayableCover847694237__playButton"},vars:{},stVars:{},keyframes:{},layers:{}},"",-1,e.id)},57061:function(e,t,n){var o=n(82016);e.exports=o.create("VideoPlayer2054936319",{classes:{root:"VideoPlayer2054936319__root",playerContainer:"VideoPlayer2054936319__playerContainer",facebookContainer:"VideoPlayer2054936319__facebookContainer",cover:"VideoPlayer2054936319__cover",vimeoContainer:"VideoPlayer2054936319__vimeoContainer",fadeEnter:"VideoPlayer2054936319__fadeEnter",fadeEnterActive:"VideoPlayer2054936319__fadeEnterActive",secondPoster:"VideoPlayer2054936319__secondPoster"},vars:{},stVars:{backgroundColor:"rgba(var(--backgroundColor, 0,0,0), var(--alpha-backgroundColor, 1))",font:"var(--font)",fontColor:"rgba(var(--fontColor, 255,255,255), var(--alpha-fontColor, 1))",borderColor:"rgba(var(--borderColor, 0,0,0), var(--alpha-borderColor, 1))",borderSize:"var(--borderSize)",boxShadow:"var(--boxShadow)",playButtonSize:"var(--playButtonSize)",playButtonMobileSize:"var(--playButtonMobileSize)",textSizeScale:"1px"},keyframes:{},layers:{}},"",-1,e.id)},82016:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createRenderable=t.create=void 0;t.create=function(e,t,n,o,i,r){const s={namespace:e,classes:t.classes,keyframes:t.keyframes,layers:t.layers,vars:t.vars,stVars:t.stVars,cssStates:function(e){const t=[];for(const n in e){const o=a(n,e[n]);o&&t.push(o)}return t.join(" ")},style:l,st:l,$id:i,$depth:o,$css:n};function a(t,n){if(!1===n||null==n||n!=n)return"";if(!0===n)return function(t){return`${e}--${t}`}(t);return function(t,n){return`${e}---${t}-${n.length}-${n.replace(/\s/gm,"_")}`}(t,n.toString())}function l(){const e=[];for(let t=0;t-1)throw new s.default(e,this._resolutionStack,"Cyclic dependencies detected.");if(!n)throw new s.default(e,this._resolutionStack);this._resolutionStack.push(e);var o=void 0,i=void 0;switch(n.lifetime){case l.default.TRANSIENT:i=n.resolve(this);break;case l.default.SINGLETON:void 0===(o=t.cache[e])?(i=n.resolve(this),t.cache[e]=i):i=o;break;case l.default.SCOPED:for(var r=0,a=this[u];r "),i="Could not resolve '".concat(e,"'.");return n&&(i+=" ".concat(n," \n\n Resolution path: ").concat(o)),i}(t,n,o))||this}return(0,o.__extends)(t,e),t}(i.default);t.default=r},49327:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(92712),i=(0,o.__importDefault)(n(15769)),r=(0,o.__importDefault)(n(25450)),s=(0,o.__importDefault)(n(24553));t.default=(0,o.__assign)({createContainer:i.default,Lifetime:r.default},s.default)},24553:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.asClass=t.asFunction=t.asValue=t.makeFluidInterface=t.PROPERTY_FOR_DEPENDENCIES=void 0;var o=n(92712),i=n(92712),r=(0,o.__importDefault)(n(69075)),s=(0,o.__importDefault)(n(25450));t.PROPERTY_FOR_DEPENDENCIES="dependencies";t.makeFluidInterface=function(e){var t=function(t){return e.lifetime=t,e};return{setLifetime:t,transient:function(){return t(s.default.TRANSIENT)},scoped:function(){return t(s.default.SCOPED)},singleton:function(){return t(s.default.SINGLETON)}}};t.asValue=function(e){return{resolve:function(){return e},lifetime:s.default.TRANSIENT}};t.asFunction=function(e,n){if("function"!=typeof e)throw new r.default("asFunction","function",typeof e);var o={lifetime:s.default.TRANSIENT};n=(0,i.__assign)({},o,n);var l=a(e),u={resolve:l,lifetime:n.lifetime};return u.resolve=l.bind(u),(0,i.__assign)(u,(0,t.makeFluidInterface)(u)),u};function a(e,n){n||(n=e);var o=n[t.PROPERTY_FOR_DEPENDENCIES]||[];return function(t){if(o.length>0){var n=o.reduce((function(e,n){return e[n]=t.resolve(n),e}),{});return e(n,t)}return e(t)}}t.asClass=function(e,n){if("function"!=typeof e)throw new r.default("asClass","class",typeof e);var l={lifetime:s.default.TRANSIENT};n=(0,i.__assign)({},l,n);var u=a((function(){for(var t=[],n=0;n0&&(this._attachedAdapter=this._playableAdapters[0],this._attachedAdapter.attach(this._video))},e.prototype._detachCurrentAdapter=function(){this._attachedAdapter&&(this._attachedAdapter.detach(),this._attachedAdapter=null)},Object.defineProperty(e.prototype,"attachedAdapter",{get:function(){return this._attachedAdapter},enumerable:!1,configurable:!0}),e.prototype.connectAdapter=function(e){this._detachCurrentAdapter(),this._resolvePlayableAdapters(e),this._connectAdapterToVideo()},e.prototype.destroy=function(){this._detachCurrentAdapter()},e}();t.default=s},31646:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=(0,n(92712).__importDefault)(n(64698)),i=n(24590),r=[(0,o.default)(i.MediaStreamType.HLS,i.MediaStreamDeliveryPriority.NATIVE_ADAPTIVE),(0,o.default)(i.MediaStreamType.DASH,i.MediaStreamDeliveryPriority.NATIVE_ADAPTIVE),(0,o.default)(i.MediaStreamType.MP4,i.MediaStreamDeliveryPriority.NATIVE_PROGRESSIVE),(0,o.default)(i.MediaStreamType.WEBM,i.MediaStreamDeliveryPriority.NATIVE_PROGRESSIVE),(0,o.default)(i.MediaStreamType.OGG,i.MediaStreamDeliveryPriority.NATIVE_PROGRESSIVE),(0,o.default)(i.MediaStreamType.MOV,i.MediaStreamDeliveryPriority.NATIVE_PROGRESSIVE),(0,o.default)(i.MediaStreamType.MKV,i.MediaStreamDeliveryPriority.NATIVE_PROGRESSIVE)];t.default=r},64698:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(92712),i=n(24590),r=n(91211),s=n(33023),a=1,l=2,u=3,c=4;t.default=function(e,t){return function(){function n(e){this.mediaStreams=null,this.eventEmitter=e,this.currentLevel=0,this._bindCallbacks()}return n.isSupported=function(){return s.NativeEnvironmentSupport[e]},Object.defineProperty(n.prototype,"currentUrl",{get:function(){return this.mediaStreams[this.currentLevel].url},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"syncWithLiveTime",{get:function(){},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isDynamicContent",{get:function(){return!isFinite(this.video.duration)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isDynamicContentEnded",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isSyncWithLive",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isSeekAvailable",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"mediaStreamDeliveryPriority",{get:function(){return t},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"mediaStreamType",{get:function(){return e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"debugInfo",{get:function(){if(this.video){var e=this.video,t=e.buffered,n=e.currentTime,i=(0,r.geOverallBufferLength)(t),s=(0,r.getNearestBufferSegmentInfo)(t,n);return(0,o.__assign)((0,o.__assign)({},this.mediaStreams[0]),{deliveryPriority:this.mediaStreamDeliveryPriority,overallBufferLength:i,nearestBufferSegInfo:s})}return{}},enumerable:!1,configurable:!0}),n.prototype._bindCallbacks=function(){this._broadcastError=this._broadcastError.bind(this)},n.prototype.canPlay=function(t){return t===e},n.prototype.setMediaStreams=function(e){this.mediaStreams=e},n.prototype._logError=function(t,n){this.eventEmitter.emitAsync(i.VideoEvent.ERROR,{errorType:t,streamType:e,streamProvider:"native",errorInstance:n})},n.prototype._broadcastError=function(){var e=this.video.error;if(e)switch(e.code){case a:break;case l:this._logError(i.Error.CONTENT_LOAD,e);break;case u:this._logError(i.Error.MEDIA,e);break;case c:this._logError(i.Error.CONTENT_LOAD,e);break;default:this._logError(i.Error.UNKNOWN,e)}else this._logError(i.Error.UNKNOWN,null)},n.prototype.attach=function(e){this.video=e,this.video.addEventListener("error",this._broadcastError),this.video.src=this.mediaStreams[this.currentLevel].url},n.prototype.detach=function(){this.video.removeEventListener("error",this._broadcastError),this.video.removeAttribute("src"),this.video=null},n}()}},68497:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(92712),i=n(68785),r=(0,o.__importDefault)(n(33320)),s=(0,o.__importDefault)(n(3398)),a=n(24590),l=(0,o.__importDefault)(n(98471)),u=(0,o.__importDefault)(n(350)),c=n(56398),d=function(e){e.preventDefault()},p=function(){function e(e){var t=e.eventEmitter,n=e.config,o=e.availablePlaybackAdapters,i=void 0===o?[]:o;this._createVideoTag(n),this._eventEmitter=t,this._availablePlaybackAdapters=i,this._stateEngine=new r.default(this._eventEmitter,this._video),this._nativeEventsBroadcaster=new s.default(t,this._video),this._adapterStrategy=new l.default(this._eventEmitter,this._video,this._availablePlaybackAdapters)}return e.prototype._createVideoTag=function(e){var t=e.videoElement,n=e.preventContextMenu;t&&"VIDEO"===t.tagName?this._video=t:this._video=document.createElement("video"),n&&this._video.addEventListener("contextmenu",d)},e.prototype.play=function(){var e=this;this._eventEmitter.emitAsync(u.default.PLAY_REQUEST),this._pauseRequested=!1,this._playPromise||(this._playPromise=this._video.play(),void 0!==this._playPromise&&this._playPromise.then((function(){e._playPromise=null,e._pauseRequested&&e.pause()})).catch((function(t){e._eventEmitter.emitAsync(u.default.PLAY_ABORTED,t),e._playPromise=null})))},e.prototype.pause=function(){this._playPromise?this._pauseRequested=!0:(this._video.pause(),this._pauseRequested=!1)},e.prototype.setMute=function(e){this._video.muted=e,this._nativeEventsBroadcaster.checkVolumeChangeAfterLoadStart()},e.prototype.setAutoplay=function(e){this._video.autoplay=e},e.prototype.setInline=function(e){e?this._video.setAttribute("playsinline","true"):this._video.removeAttribute("playsinline")},e.prototype.setCrossOrigin=function(e){e?this._video.setAttribute("crossorigin",e):this._video.removeAttribute("crossorigin")},e.prototype.setCurrentTime=function(e){this._video.currentTime=e},e.prototype.setVolume=function(e){this._video.volume=e,this._nativeEventsBroadcaster.checkVolumeChangeAfterLoadStart()},e.prototype.setLoop=function(e){this._video.loop=e},e.prototype.setPlaybackRate=function(e){this._video.playbackRate=e},e.prototype.setPreload=function(e){void 0===e&&(e=i.PreloadType.AUTO),this._video.preload=e||i.PreloadType.AUTO},e.prototype.setSrc=function(e,t){this._stateEngine.clearTimestamps(),this._adapterStrategy.connectAdapter(e),this._stateEngine.setState(a.EngineState.SRC_SET),"function"==typeof t&&t()},e.prototype.syncWithLive=function(){this.attachedAdapter&&this.attachedAdapter.isDynamicContent&&!this.attachedAdapter.isDynamicContentEnded&&!this.isSyncWithLive&&(this.setCurrentTime(this.attachedAdapter.syncWithLiveTime),this.play())},e.prototype.getElement=function(){return this._video},e.prototype._getViewDimensions=function(){return{width:this._video.offsetWidth,height:this._video.offsetHeight}},Object.defineProperty(e.prototype,"volume",{get:function(){return this._video.volume},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentTime",{get:function(){return this._video.currentTime},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"duration",{get:function(){return this._video.duration},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"autoplay",{get:function(){return this._video.autoplay},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"crossOrigin",{get:function(){return this._video.getAttribute("crossorigin")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"playbackRate",{get:function(){return this._video.playbackRate},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"buffered",{get:function(){return this._video.buffered},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"preload",{get:function(){return this._video.preload},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isPaused",{get:function(){return this._video.paused},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isMuted",{get:function(){return Boolean(this._video.muted)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isEnded",{get:function(){return this._video.ended},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isInline",{get:function(){return Boolean(this._video.getAttribute("playsinline"))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isAutoplay",{get:function(){return this._video.autoplay},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isLoop",{get:function(){return this._video.loop},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isMetadataLoaded",{get:function(){return this._stateEngine.isMetadataLoaded},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isDynamicContent",{get:function(){return!!this.attachedAdapter&&this.attachedAdapter.isDynamicContent},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isDynamicContentEnded",{get:function(){return!!this.attachedAdapter&&this.attachedAdapter.isDynamicContentEnded},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isSeekAvailable",{get:function(){return!!this.attachedAdapter&&this.attachedAdapter.isSeekAvailable},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isSyncWithLive",{get:function(){return!!this.attachedAdapter&&this.attachedAdapter.isSyncWithLive},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isPreloadActive",{get:function(){return!((0,c.isIPad)()||(0,c.isIPhone)()||(0,c.isIPod)()||(0,c.isAndroid)())&&"none"!==this.preload},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isAutoPlayActive",{get:function(){return!((0,c.isIPad)()||(0,c.isIPhone)()||(0,c.isIPod)()||(0,c.isAndroid)())&&this.isAutoplay},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"videoHeight",{get:function(){return this._video.videoHeight},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"videoWidth",{get:function(){return this._video.videoWidth},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"src",{get:function(){return this.attachedAdapter&&this.attachedAdapter.currentUrl},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentState",{get:function(){return this._stateEngine.state},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"attachedAdapter",{get:function(){return this._adapterStrategy.attachedAdapter},enumerable:!1,configurable:!0}),e.prototype.getDebugInfo=function(){var e,t=this.duration,n=this.currentTime;return this.attachedAdapter&&(e=this.attachedAdapter.debugInfo),(0,o.__assign)((0,o.__assign)({},e),{duration:t,currentTime:n,loadingStateTimestamps:this._stateEngine.stateTimestamps,viewDimensions:this._getViewDimensions(),output:"html5video"})},e.prototype.destroy=function(){this._nativeEventsBroadcaster.destroy(),this._adapterStrategy.destroy(),this._video.removeEventListener("contextmenu",d),this._video.parentNode&&this._video.parentNode.removeChild(this._video),this._video=null},e.moduleName="nativeOutput",e.dependencies=["eventEmitter","config","availablePlaybackAdapters"],e}();t.default=p},3398:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NATIVE_VIDEO_TO_BROADCAST=void 0;var o=n(24590);t.NATIVE_VIDEO_TO_BROADCAST=["loadstart","progress","error","stalled","suspend","durationchange","timeupdate","volumechange","seeking"];var i=function(){function e(e,t){this._eventEmitter=e,this._video=t,this._currentMute=this._video.muted,this._currentVolume=this._video.volume,this._bindCallbacks(),this._bindEvents()}return e.prototype._bindCallbacks=function(){this._processEventFromVideo=this._processEventFromVideo.bind(this)},e.prototype._bindEvents=function(){var e=this;t.NATIVE_VIDEO_TO_BROADCAST.forEach((function(t){return e._video.addEventListener(t,e._processEventFromVideo)}))},e.prototype._unbindEvents=function(){var e=this;t.NATIVE_VIDEO_TO_BROADCAST.forEach((function(t){return e._video.removeEventListener(t,e._processEventFromVideo)}))},e.prototype._processEventFromVideo=function(e){void 0===e&&(e={});var t=this._video;switch(e.type){case"loadstart":this._shouldCheckVolume&&this._checkVolumeChanges();break;case"progress":this._eventEmitter.emitAsync(o.VideoEvent.CHUNK_LOADED);break;case"stalled":this._eventEmitter.emitAsync(o.VideoEvent.UPLOAD_STALLED);break;case"suspend":this._eventEmitter.emitAsync(o.VideoEvent.UPLOAD_SUSPEND);break;case"seeking":this._eventEmitter.emitAsync(o.VideoEvent.SEEK_IN_PROGRESS,t.currentTime);break;case"durationchange":this._eventEmitter.emitAsync(o.VideoEvent.DURATION_UPDATED,t.duration);break;case"timeupdate":this._eventEmitter.emitAsync(o.VideoEvent.CURRENT_TIME_UPDATED,t.currentTime);break;case"volumechange":this._shouldCheckVolume&&(this._shouldCheckVolume=!1),this._checkVolumeChanges()}},e.prototype._checkVolumeChanges=function(){var e=this._video;this._currentVolume!==e.volume&&(this._currentVolume=100*e.volume,this._eventEmitter.emitAsync(o.VideoEvent.VOLUME_CHANGED,this._currentVolume)),this._currentMute!==e.muted&&(this._currentMute=e.muted,this._eventEmitter.emitAsync(o.VideoEvent.MUTE_CHANGED,this._currentMute)),this._eventEmitter.emitAsync(o.VideoEvent.SOUND_STATE_CHANGED,{volume:e.volume,muted:e.muted})},e.prototype.checkVolumeChangeAfterLoadStart=function(){this._shouldCheckVolume=!0},e.prototype.destroy=function(){this._unbindEvents()},e}();t.default=i},33320:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NATIVE_VIDEO_EVENTS_TO_STATE=void 0;var o=n(56398),i=n(24590);t.NATIVE_VIDEO_EVENTS_TO_STATE=["loadstart","loadedmetadata","canplay","play","playing","pause","ended","waiting","seeking","seeked"];var r=function(){function e(e,t){this._eventEmitter=e,this._video=t,this._currentState=null,this._isMetadataLoaded=!1,this._statesTimestamps={},this._bindCallbacks(),this._bindEvents()}return e.prototype._bindCallbacks=function(){this._processEventFromVideo=this._processEventFromVideo.bind(this)},e.prototype._bindEvents=function(){var e=this;t.NATIVE_VIDEO_EVENTS_TO_STATE.forEach((function(t){e._video.addEventListener(t,e._processEventFromVideo)}))},e.prototype._unbindEvents=function(){var e=this;t.NATIVE_VIDEO_EVENTS_TO_STATE.forEach((function(t){return e._video.removeEventListener(t,e._processEventFromVideo)}))},e.prototype.clearTimestamps=function(){this._statesTimestamps={}},e.prototype._setInitialTimeStamp=function(){this._initialTimeStamp=Date.now()},e.prototype._setStateTimestamp=function(e){this._statesTimestamps[e]||(this._statesTimestamps[e]=Date.now()-this._initialTimeStamp,this._setInitialTimeStamp())},Object.defineProperty(e.prototype,"stateTimestamps",{get:function(){return this._statesTimestamps},enumerable:!1,configurable:!0}),e.prototype._processEventFromVideo=function(e){void 0===e&&(e={});var t=this._video;switch(e.type){case"loadstart":this._setInitialTimeStamp(),this.setState(i.EngineState.LOAD_STARTED);break;case"loadedmetadata":this._setStateTimestamp(i.EngineState.METADATA_LOADED),this.setState(i.EngineState.METADATA_LOADED),this._isMetadataLoaded=!0;break;case"canplay":this._currentState===i.EngineState.METADATA_LOADED&&(this._setStateTimestamp(i.EngineState.READY_TO_PLAY),this.setState(i.EngineState.READY_TO_PLAY));break;case"play":this.setState(i.EngineState.PLAY_REQUESTED);break;case"playing":(0,o.isSafari)()&&t.paused||this.setState(i.EngineState.PLAYING);break;case"waiting":this.setState(i.EngineState.WAITING);break;case"pause":(0,o.isSafari)()?t.played.length&&this.setState(i.EngineState.PAUSED):this.setState(i.EngineState.PAUSED);break;case"ended":this.setState(i.EngineState.ENDED);break;case"seeking":this.setState(i.EngineState.SEEK_IN_PROGRESS);break;case"seeked":this.setState(t.paused?i.EngineState.PAUSED:i.EngineState.PLAYING)}},e.prototype.setState=function(e){e!==this._currentState&&(this._currentState!==i.EngineState.METADATA_LOADED||e!==i.EngineState.SEEK_IN_PROGRESS&&e!==i.EngineState.PAUSED)&&(this._eventEmitter.emitAsync(i.VideoEvent.STATE_CHANGED,{prevState:this._currentState,nextState:e}),this._eventEmitter.emitAsync(e),this._currentState=e)},Object.defineProperty(e.prototype,"isMetadataLoaded",{get:function(){return this._isMetadataLoaded},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return this._currentState},enumerable:!1,configurable:!0}),e.prototype.destroy=function(){this._unbindEvents()},e}();t.default=r},46919:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(92712),i=(0,o.__importDefault)(n(17022)),r=n(24590),s=function(){function e(e){var t=e.eventEmitter,n=e.nativeOutput,o=e.config;this._eventEmitter=t,this._config=o,this._defaultOutput=n,this._output=n,this._applyConfig(this._config)}return e.prototype._applyConfig=function(e){void 0===e&&(e={});var t=e.preload,n=e.autoplay,o=e.loop,i=e.muted,r=e.volume,s=e.playsinline,a=e.crossOrigin,l=e.src;this.setPreload(t),this.setAutoplay(n),this.setLoop(o),this.setMute(i),this.setVolume(r),this.setPlaysinline(s),this.setCrossOrigin(a),l&&this.setSrc(l)},e.prototype.getElement=function(){return this._output.getElement()},Object.defineProperty(e.prototype,"isDynamicContent",{get:function(){return this._output.isDynamicContent},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isDynamicContentEnded",{get:function(){return this._output.isDynamicContentEnded},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isSeekAvailable",{get:function(){return this._output.isSeekAvailable},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isMetadataLoaded",{get:function(){return this._output.isMetadataLoaded},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isPreloadActive",{get:function(){return this._output.isPreloadActive},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isAutoPlayActive",{get:function(){return this._output.isAutoPlayActive},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isSyncWithLive",{get:function(){return this._output.isSyncWithLive},enumerable:!1,configurable:!0}),e.prototype.setSrc=function(e,t){e!==this.getSrc()&&this._output.setSrc(e,t)},e.prototype.getSrc=function(){return this._output.src},e.prototype.reset=function(){this.pause(),this.seekTo(0),this._eventEmitter.emitAsync(r.VideoEvent.RESET)},e.prototype.play=function(){this._output.play()},e.prototype.pause=function(){this._output.pause()},e.prototype.togglePlayback=function(){this.isPaused?this.play():this.pause()},e.prototype.resetPlayback=function(){this.pause(),this.seekTo(0),this._eventEmitter.emitAsync(r.VideoEvent.RESET)},Object.defineProperty(e.prototype,"isPaused",{get:function(){return this._output.isPaused},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isEnded",{get:function(){return this._output.isEnded},enumerable:!1,configurable:!0}),e.prototype.syncWithLive=function(){this._output.syncWithLive()},e.prototype.seekForward=function(e){var t=this.getDuration();if(t){var n=this.getCurrentTime();this.seekTo(Math.min(n+e,t))}},e.prototype.seekBackward=function(e){if(this.getDuration()){var t=this.getCurrentTime();this.seekTo(Math.max(t-e,0))}},e.prototype.setVolume=function(e){var t=Number(e),n=isNaN(t)?1:Math.max(0,Math.min(Number(e)/100,1));this._output.setVolume(n)},e.prototype.getVolume=function(){return 100*this._output.volume},e.prototype.increaseVolume=function(e){this.setVolume(this.getVolume()+e)},e.prototype.decreaseVolume=function(e){this.setVolume(this.getVolume()-e)},e.prototype.setMute=function(e){this._output.setMute(e)},e.prototype.mute=function(){this.setMute(!0)},e.prototype.unmute=function(){this.setMute(!1)},Object.defineProperty(e.prototype,"isMuted",{get:function(){return this._output.isMuted},enumerable:!1,configurable:!0}),e.prototype.setAutoplay=function(e){this._output.setAutoplay(e)},e.prototype.getAutoplay=function(){return this._output.isAutoplay},e.prototype.setLoop=function(e){this._output.setLoop(e)},e.prototype.getLoop=function(){return this._output.isLoop},e.prototype.setPlaybackRate=function(e){this._output.setPlaybackRate(e)},e.prototype.getPlaybackRate=function(){return this._output.playbackRate},e.prototype.setPreload=function(e){this._output.setPreload(e)},e.prototype.getPreload=function(){return this._output.preload},e.prototype.getCurrentTime=function(){return this._output.currentTime},e.prototype.seekTo=function(e){this._output.setCurrentTime(e)},e.prototype.getDuration=function(){return this._output.duration||0},e.prototype.getVideoWidth=function(){return this._output.videoWidth},e.prototype.getVideoHeight=function(){return this._output.videoHeight},e.prototype.getBuffered=function(){return this._output.buffered},e.prototype.setPlaysinline=function(e){this._output.setInline(e)},e.prototype.getPlaysinline=function(){return this._output.isInline},e.prototype.setCrossOrigin=function(e){this._output.setCrossOrigin(e)},e.prototype.getCrossOrigin=function(){return this._output.crossOrigin},e.prototype.getCurrentState=function(){return this._output.currentState},e.prototype.getDebugInfo=function(){return this._output.getDebugInfo()},e.prototype.destroy=function(){},e.prototype.changeOutput=function(e,t){var n=this.getSrc();return this._output.pause(),this._output=e,this._applyConfig(this._config),this._output.setSrc(n,t)},e.prototype.resetOutput=function(){var e=!this._output.isPaused,t=this._output.currentTime;this._output=this._defaultOutput,this._output.setCurrentTime(t),e&&this._output.play()},e.moduleName="engine",e.dependencies=["eventEmitter","config","nativeOutput"],(0,o.__decorate)([(0,i.default)()],e.prototype,"setSrc",null),(0,o.__decorate)([(0,i.default)()],e.prototype,"getSrc",null),(0,o.__decorate)([(0,i.default)()],e.prototype,"reset",null),(0,o.__decorate)([(0,i.default)()],e.prototype,"play",null),(0,o.__decorate)([(0,i.default)()],e.prototype,"pause",null),(0,o.__decorate)([(0,i.default)()],e.prototype,"togglePlayback",null),(0,o.__decorate)([(0,i.default)()],e.prototype,"resetPlayback",null),(0,o.__decorate)([(0,i.default)()],e.prototype,"isPaused",null),(0,o.__decorate)([(0,i.default)()],e.prototype,"isEnded",null),(0,o.__decorate)([(0,i.default)()],e.prototype,"syncWithLive",null),(0,o.__decorate)([(0,i.default)()],e.prototype,"seekForward",null),(0,o.__decorate)([(0,i.default)()],e.prototype,"seekBackward",null),(0,o.__decorate)([(0,i.default)()],e.prototype,"setVolume",null),(0,o.__decorate)([(0,i.default)()],e.prototype,"getVolume",null),(0,o.__decorate)([(0,i.default)()],e.prototype,"increaseVolume",null),(0,o.__decorate)([(0,i.default)()],e.prototype,"decreaseVolume",null),(0,o.__decorate)([(0,i.default)()],e.prototype,"mute",null),(0,o.__decorate)([(0,i.default)()],e.prototype,"unmute",null),(0,o.__decorate)([(0,i.default)()],e.prototype,"isMuted",null),(0,o.__decorate)([(0,i.default)()],e.prototype,"setAutoplay",null),(0,o.__decorate)([(0,i.default)()],e.prototype,"getAutoplay",null),(0,o.__decorate)([(0,i.default)()],e.prototype,"setLoop",null),(0,o.__decorate)([(0,i.default)()],e.prototype,"getLoop",null),(0,o.__decorate)([(0,i.default)()],e.prototype,"setPlaybackRate",null),(0,o.__decorate)([(0,i.default)()],e.prototype,"getPlaybackRate",null),(0,o.__decorate)([(0,i.default)()],e.prototype,"setPreload",null),(0,o.__decorate)([(0,i.default)()],e.prototype,"getPreload",null),(0,o.__decorate)([(0,i.default)()],e.prototype,"getCurrentTime",null),(0,o.__decorate)([(0,i.default)()],e.prototype,"seekTo",null),(0,o.__decorate)([(0,i.default)()],e.prototype,"getDuration",null),(0,o.__decorate)([(0,i.default)("getVideoRealWidth")],e.prototype,"getVideoWidth",null),(0,o.__decorate)([(0,i.default)("getVideoRealHeight")],e.prototype,"getVideoHeight",null),(0,o.__decorate)([(0,i.default)()],e.prototype,"setPlaysinline",null),(0,o.__decorate)([(0,i.default)()],e.prototype,"getPlaysinline",null),(0,o.__decorate)([(0,i.default)()],e.prototype,"setCrossOrigin",null),(0,o.__decorate)([(0,i.default)()],e.prototype,"getCrossOrigin",null),(0,o.__decorate)([(0,i.default)("getPlaybackState")],e.prototype,"getCurrentState",null),(0,o.__decorate)([(0,i.default)()],e.prototype,"getDebugInfo",null),e}();t.default=s},68785:function(e,t){"use strict";var n,o;Object.defineProperty(t,"__esModule",{value:!0}),t.CrossOriginValue=t.PreloadType=void 0,function(e){e.NONE="none",e.METADATA="metadata",e.AUTO="auto"}(n||(n={})),t.PreloadType=n,function(e){e.ANONYMUS="anonymous",e.CREDENTIALS="use-credentials"}(o||(o={})),t.CrossOriginValue=o},34772:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveAdapters=void 0;var o=n(24590);t.resolveAdapters=function(e,t){var n=[],i=function(e){var t={};return e.forEach((function(e){var n=e.type||o.MimeToStreamTypeMap[e.mimeType];n&&(Array.isArray(t[n])||(t[n]=[]),t[n].push({url:e.url,type:n}))})),t}(e),r=Object.keys(i);return t.forEach((function(e){for(var t=0;t'}}},32860:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.containerTemplate=void 0;var o=(0,n(92712).__importDefault)(n(71389)),i=o.default.default?o.default.default:o.default;t.containerTemplate=i},48783:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,i=(0,n(92712).__importDefault)(n(29413)),r="undefined"!=typeof document&&"onfocusin"in document,s=r?"focusin":"focus",a=r?"focusout":"blur",l=null,u=null,c={pointer:!1,key:!1,script:!1,initial:!1};function d(e){var t="";if(e.type===s){var n=o.get();t=u||n.pointer&&"pointer"||n.key&&"key"||"script"}else"initial"===e.type&&(t="initial");document.documentElement.setAttribute("data-playable-focus-source",t),e.type!==a&&(c[t]=!0,l=t)}function p(){return l}function h(e){return c[e]}function _(e){u=e}function f(){u=!1}t.default={engage:function(){return document.documentElement.addEventListener(s,d,!0),document.documentElement.addEventListener(a,d,!0),o=i.default.engage(),d({type:"initial"}),{used:h,current:p,lock:_,unlock:f}},disengage:function(){d({type:a}),l=u=null,Object.keys(c).forEach((function(e){c[e]=!1})),i.default.disengage(),document.documentElement.removeEventListener(s,d,!0),document.documentElement.removeEventListener(a,d,!0),document.documentElement.removeAttribute("data-playable-focus-source")}}},51471:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="undefined"!=typeof window&&window.document&&"unknown"!=typeof window.document.activeElement,o="focus-within";t.default=function(e,t,i){var r,s,a,l,u=(l=function(){var l,u=n?document.activeElement:null;if(r=!1,s!==u){if(s=u,l=e,Array.prototype.slice.call(l.getElementsByClassName(o)).forEach((function(e){e.classList.remove(o)})),!e.contains(u))return void(a&&(a=!1,i()));a||(a=!0,t()),function(e,t){for(var n=t;n!==e&&void 0!==n.classList;)n.classList.add(o),n=n.parentNode}(e,u)}},function(){r||(requestAnimationFrame(l),r=!0)});return e.addEventListener("focus",u,!0),e.addEventListener("blur",u,!0),u(),function(){e.removeEventListener("focus",u,!0),e.removeEventListener("blur",u,!0)}}},29413:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=0,o=0,i=["touchstart","pointerdown","MSPointerDown","mousedown"],r=["touchend","touchcancel","pointerup","MSPointerUp","pointercancel","MSPointerCancel","mouseup"];function s(){n=0,o=0}function a(e){!1!==e.isPrimary&&(n+=1)}function l(e){!1!==e.isPrimary&&(e.touches?n=e.touches.length:(window.setImmediate||window.setTimeout)((function(){n=Math.max(n-1,0)})))}function u(e){switch(e.keyCode||e.which){case 16:case 17:case 18:case 91:case 93:return}o+=1}function c(e){switch(e.keyCode||e.which){case 16:case 17:case 18:case 91:case 93:return}(window.setImmediate||window.setTimeout)((function(){o=Math.max(o-1,0)}))}function d(){return{pointer:Boolean(n),key:Boolean(o)}}t.default={engage:function(){return window.addEventListener("blur",s,!1),document.documentElement.addEventListener("keydown",u,!0),document.documentElement.addEventListener("keyup",c,!0),i.forEach((function(e){document.documentElement.addEventListener(e,a,!0)})),r.forEach((function(e){document.documentElement.addEventListener(e,l,!0)})),{get:d}},disengage:function(){n=o=0,window.removeEventListener("blur",s,!1),document.documentElement.removeEventListener("keydown",u,!0),document.documentElement.removeEventListener("keyup",c,!0),i.forEach((function(e){document.documentElement.removeEventListener(e,a,!0)})),r.forEach((function(e){document.documentElement.removeEventListener(e,l,!0)}))}}},1876:function(e,t,n){"use strict";var o;Object.defineProperty(t,"__esModule",{value:!0});var i=n(24590),r=((o={})[i.TextLabel.LOGO_LABEL]="Watch on site",o[i.TextLabel.LOGO_TOOLTIP]="Watch On Site",o[i.TextLabel.LIVE_INDICATOR_TEXT]=function(e){return e.isEnded?"Live Ended":"Live"},o[i.TextLabel.LIVE_SYNC_LABEL]="Sync to live",o[i.TextLabel.LIVE_SYNC_TOOLTIP]="Sync to Live",o[i.TextLabel.PAUSE_CONTROL_LABEL]="Pause",o[i.TextLabel.PLAY_CONTROL_LABEL]="Play",o[i.TextLabel.PROGRESS_CONTROL_LABEL]="Progress control",o[i.TextLabel.PROGRESS_CONTROL_VALUE]=function(e){var t=e.percent;return"Already played ".concat(t,"%")},o[i.TextLabel.MUTE_CONTROL_LABEL]="Mute",o[i.TextLabel.MUTE_CONTROL_TOOLTIP]="Mute",o[i.TextLabel.UNMUTE_CONTROL_LABEL]="Unmute",o[i.TextLabel.UNMUTE_CONTROL_TOOLTIP]="Unmute",o[i.TextLabel.VOLUME_CONTROL_LABEL]="Volume control",o[i.TextLabel.VOLUME_CONTROL_VALUE]=function(e){var t=e.volume;return"Volume is ".concat(t,"%")},o[i.TextLabel.ENTER_FULL_SCREEN_LABEL]="Enter full screen",o[i.TextLabel.ENTER_FULL_SCREEN_TOOLTIP]="Enter Full Screen",o[i.TextLabel.EXIT_FULL_SCREEN_LABEL]="Exit full screen",o[i.TextLabel.EXIT_FULL_SCREEN_TOOLTIP]="Exit Full Screen",o[i.TextLabel.ENTER_PICTURE_IN_PICTURE_LABEL]="Play Picture-in-Picture",o[i.TextLabel.ENTER_PICTURE_IN_PICTURE_TOOLTIP]="Play Picture-in-Picture",o[i.TextLabel.EXIT_PICTURE_IN_PICTURE_LABEL]="Exit Picture-in-Picture",o[i.TextLabel.EXIT_PICTURE_IN_PICTURE_TOOLTIP]="Exit Picture-in-Picture",o[i.TextLabel.DOWNLOAD_BUTTON_LABEL]="Download video",o[i.TextLabel.DOWNLOAD_BUTTON_TOOLTIP]="Download Video",o);t.default=r},47455:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(92712),i=(0,o.__importDefault)(n(1876)),r=function(){function e(e){var t=e.config;this._textMap=(0,o.__assign)((0,o.__assign)({},i.default),t.texts)}return e.prototype.get=function(e,t,n){if(this._textMap){var o=this._textMap[e]||n;return"function"==typeof o?o(t):o}},e.prototype.destroy=function(){this._textMap=null},e.moduleName="textMap",e.dependencies=["config"],e}();t.default=r},28523:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(92712),i=(0,o.__importDefault)(n(17022)),r=(0,o.__importDefault)(n(48707)),s=n(24590),a=function(){function e(e){this._isBlockFocused=!1,this.isHidden=!1;var t=e.eventEmitter;this._eventEmitter=t,this._bindViewCallbacks(),this._initUI(this._getControlElements(e)),this._bindEvents()}return e.prototype._getControlElements=function(e){var t=e.playControl,n=e.progressControl,o=e.timeControl,i=e.volumeControl,r=e.fullScreenControl,s=e.logo,a=e.downloadButton,l=e.pictureInPictureControl;return{play:t.getElement(),progress:n.getElement(),time:o.getElement(),volume:i.getElement(),fullScreen:r.getElement(),download:a.getElement(),logo:s.getElement(),pictureInPicture:l.getElement()}},e.prototype.getElement=function(){return this.view.getElement()},e.prototype.addControl=function(e,t,n){var o=(n||{}).position,i=void 0===o?"right":o;this.view.addControl(e,t,i)},e.prototype._initUI=function(t){var n={elements:t,callbacks:{onBlockMouseMove:this._setFocusState,onBlockMouseOut:this._removeFocusState}};this.view=new e.View(n),this.hideLogo(),this.hideDownloadButton()},e.prototype._bindEvents=function(){this._unbindEvents=this._eventEmitter.bindEvents([[s.UIEvent.FULL_SCREEN_STATE_CHANGED,this._removeFocusState]],this)},e.prototype._bindViewCallbacks=function(){this._setFocusState=this._setFocusState.bind(this),this._removeFocusState=this._removeFocusState.bind(this)},e.prototype._setFocusState=function(){this._isBlockFocused=!0},e.prototype._removeFocusState=function(){this._isBlockFocused=!1},Object.defineProperty(e.prototype,"isFocused",{get:function(){return this._isBlockFocused},enumerable:!1,configurable:!0}),e.prototype.showContent=function(){this.view.showContent()},e.prototype.hideContent=function(){this.view.hideContent()},e.prototype.hide=function(){this.isHidden=!0,this.view.hide()},e.prototype.show=function(){this.isHidden=!1,this.view.show()},e.prototype.setAlwaysShowLogo=function(e){this.view.setShouldLogoShowAlwaysFlag(e)},e.prototype.hideLogo=function(){this.view.hideLogo()},e.prototype.showLogo=function(){this.view.showLogo()},e.prototype.showPlayControl=function(){this.view.showPlayControl()},e.prototype.showVolumeControl=function(){this.view.showVolumeControl()},e.prototype.showTimeControl=function(){this.view.showTimeControl()},e.prototype.showFullScreenControl=function(){this.view.showFullScreenControl()},e.prototype.showPictureInPictureControl=function(){this.view.showPictureInPictureControl()},e.prototype.showProgressControl=function(){this.view.showProgressControl()},e.prototype.showDownloadButton=function(){this.view.showDownloadButton()},e.prototype.hidePlayControl=function(){this.view.hidePlayControl()},e.prototype.hideVolumeControl=function(){this.view.hideVolumeControl()},e.prototype.hideTimeControl=function(){this.view.hideTimeControl()},e.prototype.hideFullScreenControl=function(){this.view.hideFullScreenControl()},e.prototype.hidePictureInPictureControl=function(){this.view.hidePictureInPictureControl()},e.prototype.hideProgressControl=function(){this.view.hideProgressControl()},e.prototype.hideDownloadButton=function(){this.view.hideDownloadButton()},e.prototype.destroy=function(){this._unbindEvents(),this.view.destroy()},e.moduleName="bottomBlock",e.View=r.default,e.dependencies=["playControl","progressControl","timeControl","volumeControl","fullScreenControl","logo","downloadButton","eventEmitter","pictureInPictureControl"],(0,o.__decorate)([(0,i.default)()],e.prototype,"setAlwaysShowLogo",null),(0,o.__decorate)([(0,i.default)()],e.prototype,"hideLogo",null),(0,o.__decorate)([(0,i.default)()],e.prototype,"showLogo",null),(0,o.__decorate)([(0,i.default)()],e.prototype,"showPlayControl",null),(0,o.__decorate)([(0,i.default)()],e.prototype,"showVolumeControl",null),(0,o.__decorate)([(0,i.default)()],e.prototype,"showTimeControl",null),(0,o.__decorate)([(0,i.default)()],e.prototype,"showFullScreenControl",null),(0,o.__decorate)([(0,i.default)()],e.prototype,"showPictureInPictureControl",null),(0,o.__decorate)([(0,i.default)()],e.prototype,"showProgressControl",null),(0,o.__decorate)([(0,i.default)()],e.prototype,"showDownloadButton",null),(0,o.__decorate)([(0,i.default)()],e.prototype,"hidePlayControl",null),(0,o.__decorate)([(0,i.default)()],e.prototype,"hideVolumeControl",null),(0,o.__decorate)([(0,i.default)()],e.prototype,"hideTimeControl",null),(0,o.__decorate)([(0,i.default)()],e.prototype,"hideFullScreenControl",null),(0,o.__decorate)([(0,i.default)()],e.prototype,"hidePictureInPictureControl",null),(0,o.__decorate)([(0,i.default)()],e.prototype,"hideProgressControl",null),(0,o.__decorate)([(0,i.default)()],e.prototype,"hideDownloadButton",null),e}();t.default=a},48707:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(92712),i=(0,o.__importDefault)(n(30313)),r=(0,o.__importDefault)(n(61045)),s=(0,o.__importDefault)(n(46484)),a=(0,o.__importDefault)(n(23802)),l=n(53504),u=(0,o.__importDefault)(n(5024)),c=function(e){function t(t){var n=e.call(this)||this,o=t.callbacks,i=t.elements;return n._callbacks=o,n._initDOM(i),n._bindEvents(),n}return(0,o.__extends)(t,e),t.prototype._initDOM=function(e){this._$rootElement=(0,r.default)((0,l.bottomBlockTemplate)({styles:this.styleNames})),this._$leftControllsContainer=(0,s.default)(this._$rootElement,"controls-container-left"),this._$rightControllsContainer=(0,s.default)(this._$rootElement,"controls-container-right");var t=(0,s.default)(this._$rootElement,"play-container"),n=(0,s.default)(this._$rootElement,"volume-container"),o=(0,s.default)(this._$rootElement,"time-container"),i=(0,s.default)(this._$rootElement,"full-screen-container"),a=(0,s.default)(this._$rootElement,"logo-container"),u=(0,s.default)(this._$rootElement,"progress-bar-container"),c=(0,s.default)(this._$rootElement,"download-container"),d=(0,s.default)(this._$rootElement,"picture-in-picture-container");t.appendChild(e.play),n.appendChild(e.volume),o.appendChild(e.time),i.appendChild(e.fullScreen),a.appendChild(e.logo),u.appendChild(e.progress),c.appendChild(e.download),d.appendChild(e.pictureInPicture)},t.prototype._preventClickPropagation=function(e){e.stopPropagation()},t.prototype._bindEvents=function(){this._$rootElement.addEventListener("click",this._preventClickPropagation),this._$rootElement.addEventListener("mousemove",this._callbacks.onBlockMouseMove),this._$rootElement.addEventListener("mouseleave",this._callbacks.onBlockMouseOut)},t.prototype._unbindEvents=function(){this._$rootElement.removeEventListener("click",this._preventClickPropagation),this._$rootElement.removeEventListener("mousemove",this._callbacks.onBlockMouseMove),this._$rootElement.removeEventListener("mouseleave",this._callbacks.onBlockMouseOut)},t.prototype.addControl=function(e,t,n){var o=document.createElement("div");o.setAttribute("data-playable-hook","additional-".concat(e)),o.classList.add(this.styleNames.additionalButton),o.appendChild(t),"left"!==n?this._$rightControllsContainer.insertBefore(o,this._$rightControllsContainer.children[0]):this._$leftControllsContainer.appendChild(o)},t.prototype.setShouldLogoShowAlwaysFlag=function(e){(0,a.default)(this._$rootElement,this.styleNames.showLogoAlways,e),this.showLogo()},t.prototype.showPlayControl=function(){this._$rootElement.classList.remove(this.styleNames.playControlHidden)},t.prototype.hidePlayControl=function(){this._$rootElement.classList.add(this.styleNames.playControlHidden)},t.prototype.showTimeControl=function(){this._$rootElement.classList.remove(this.styleNames.timeControlHidden)},t.prototype.hideTimeControl=function(){this._$rootElement.classList.add(this.styleNames.timeControlHidden)},t.prototype.showVolumeControl=function(){this._$rootElement.classList.remove(this.styleNames.volumeControlHidden)},t.prototype.hideVolumeControl=function(){this._$rootElement.classList.add(this.styleNames.volumeControlHidden)},t.prototype.showFullScreenControl=function(){this._$rootElement.classList.remove(this.styleNames.fullScreenControlHidden)},t.prototype.hideFullScreenControl=function(){this._$rootElement.classList.add(this.styleNames.fullScreenControlHidden)},t.prototype.showLogo=function(){this._$rootElement.classList.remove(this.styleNames.logoHidden)},t.prototype.hideLogo=function(){this._$rootElement.classList.add(this.styleNames.logoHidden)},t.prototype.showProgressControl=function(){this._$rootElement.classList.remove(this.styleNames.progressControlHidden)},t.prototype.hideProgressControl=function(){this._$rootElement.classList.add(this.styleNames.progressControlHidden)},t.prototype.showDownloadButton=function(){this._$rootElement.classList.remove(this.styleNames.downloadButtonHidden)},t.prototype.hidePictureInPictureControl=function(){this._$rootElement.classList.add(this.styleNames.pictureInPictureButtonHidden)},t.prototype.showPictureInPictureControl=function(){this._$rootElement.classList.remove(this.styleNames.pictureInPictureButtonHidden)},t.prototype.hideDownloadButton=function(){this._$rootElement.classList.add(this.styleNames.downloadButtonHidden)},t.prototype.show=function(){this._$rootElement.classList.remove(this.styleNames.hidden)},t.prototype.hide=function(){this._$rootElement.classList.add(this.styleNames.hidden)},t.prototype.getElement=function(){return this._$rootElement},t.prototype.showContent=function(){this._$rootElement.classList.add(this.styleNames.activated)},t.prototype.hideContent=function(){this._$rootElement.classList.remove(this.styleNames.activated)},t.prototype.destroy=function(){this._unbindEvents(),this._$rootElement.parentNode&&this._$rootElement.parentNode.removeChild(this._$rootElement),this._$rootElement=null},t}(i.default);c.extendStyleNames(u.default),t.default=c},19382:function(e){e.exports={__esModule:!0,default:function(e){return'
'}}},53504:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bottomBlockTemplate=void 0;var o=(0,n(92712).__importDefault)(n(19382)),i=o.default.default?o.default.default:o.default;t.bottomBlockTemplate=i},90981:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(92712),i=(0,o.__importDefault)(n(17022)),r=n(24590),s=(0,o.__importStar)(n(43450)),a=(0,o.__importDefault)(n(701)),l=function(){function e(e){var t=e.eventEmitter,n=e.textMap,o=e.tooltipService,i=e.theme;this._eventEmitter=t,this._textMap=n,this._theme=i,this._tooltipService=o,this._bindCallbacks(),this._initUI(),this._initInterceptor()}return e.prototype.getElement=function(){return this.view.getElement()},e.prototype._bindCallbacks=function(){this._triggerCallback=this._triggerCallback.bind(this)},e.prototype._initUI=function(){var t={callbacks:{onButtonClick:this._triggerCallback},textMap:this._textMap,tooltipService:this._tooltipService,theme:this._theme};this.view=new e.View(t)},e.prototype._initInterceptor=function(){var e,t=this;this._interceptor=new s.default(this.getElement(),((e={})[s.KEYCODES.SPACE_BAR]=function(e){e.stopPropagation(),t._eventEmitter.emitAsync(r.UIEvent.KEYBOARD_KEYDOWN_INTERCEPTED),t._triggerCallback()},e[s.KEYCODES.ENTER]=function(e){e.stopPropagation(),t._eventEmitter.emitAsync(r.UIEvent.KEYBOARD_KEYDOWN_INTERCEPTED),t._triggerCallback()},e))},e.prototype._destroyInterceptor=function(){this._interceptor.destroy()},e.prototype._triggerCallback=function(){this._callback&&this._callback()},e.prototype.setDownloadClickCallback=function(e){this._callback=e},e.prototype.hide=function(){this.isHidden=!0,this.view.hide()},e.prototype.show=function(){this.isHidden=!1,this.view.show()},e.prototype.destroy=function(){this._destroyInterceptor(),this.view.destroy()},e.moduleName="downloadButton",e.View=a.default,e.dependencies=["eventEmitter","textMap","tooltipService","theme"],(0,o.__decorate)([(0,i.default)()],e.prototype,"setDownloadClickCallback",null),e}();t.default=l},24976:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={downloadSvgFill:{fill:function(e){return e.color}}}},701:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(92712),i=n(24590),r=(0,o.__importDefault)(n(30313)),s=n(35968),a=(0,o.__importDefault)(n(61045)),l=(0,o.__importDefault)(n(46484)),u=(0,o.__importDefault)(n(24976)),c=(0,o.__importDefault)(n(40059)),d=function(e){function t(t){var n=this,o=t.callbacks,r=t.textMap,u=t.tooltipService,c=t.theme;return(n=e.call(this,c)||this)._callbacks=o,n._textMap=r,n._$rootElement=(0,a.default)((0,s.controlTemplate)({styles:n.styleNames,themeStyles:n.themeStyles,texts:{label:n._textMap.get(i.TextLabel.DOWNLOAD_BUTTON_LABEL)}})),n._$downloadButton=(0,l.default)(n._$rootElement,"download-button"),n._tooltipReference=u.createReference(n._$downloadButton,{text:n._textMap.get(i.TextLabel.DOWNLOAD_BUTTON_TOOLTIP)}),n._bindEvents(),n}return(0,o.__extends)(t,e),t.prototype._bindEvents=function(){this._onButtonClick=this._onButtonClick.bind(this),this._$downloadButton.addEventListener("click",this._onButtonClick)},t.prototype._unbindEvents=function(){this._$downloadButton.removeEventListener("click",this._onButtonClick)},t.prototype._onButtonClick=function(){this._$rootElement.focus(),this._callbacks.onButtonClick()},t.prototype.hide=function(){this._$rootElement.classList.add(this.styleNames.hidden)},t.prototype.show=function(){this._$rootElement.classList.remove(this.styleNames.hidden)},t.prototype.getElement=function(){return this._$rootElement},t.prototype.destroy=function(){this._unbindEvents(),this._tooltipReference.destroy(),this._$rootElement.parentNode&&this._$rootElement.parentNode.removeChild(this._$rootElement),this._$downloadButton=null,this._$rootElement=null},t}(r.default);d.setTheme(u.default),d.extendStyleNames(c.default),t.default=d},83068:function(e){e.exports={__esModule:!0,default:function(e){return'
'}}},35968:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.controlTemplate=void 0;var o=(0,n(92712).__importDefault)(n(83068)),i=o.default.default?o.default.default:o.default;t.controlTemplate=i},29600:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(92712),i=n(24590),r=(0,o.__importStar)(n(43450)),s=(0,o.__importDefault)(n(67484)),a=function(){function e(e){var t=e.eventEmitter,n=e.fullScreenManager,o=e.textMap,i=e.tooltipService,r=e.theme;this._eventEmitter=t,this._fullScreenManager=n,this._textMap=o,this._theme=r,this._tooltipService=i,this._bindCallbacks(),this._initUI(),this._bindEvents(),this._fullScreenManager.isEnabled||this.hide(),this._initInterceptor()}return e.prototype.getElement=function(){return this.view.getElement()},e.prototype._bindCallbacks=function(){this._toggleFullScreen=this._toggleFullScreen.bind(this)},e.prototype._bindEvents=function(){this._unbindEvents=this._eventEmitter.bindEvents([[i.UIEvent.FULL_SCREEN_STATE_CHANGED,this.view.setFullScreenState]],this.view)},e.prototype._initUI=function(){var t={callbacks:{onButtonClick:this._toggleFullScreen},textMap:this._textMap,tooltipService:this._tooltipService,theme:this._theme};this.view=new e.View(t)},e.prototype._initInterceptor=function(){var e,t=this;this._interceptor=new r.default(this.getElement(),((e={})[r.KEYCODES.SPACE_BAR]=function(e){e.stopPropagation(),t._eventEmitter.emitAsync(i.UIEvent.KEYBOARD_KEYDOWN_INTERCEPTED)},e[r.KEYCODES.ENTER]=function(e){e.stopPropagation(),t._eventEmitter.emitAsync(i.UIEvent.KEYBOARD_KEYDOWN_INTERCEPTED)},e))},e.prototype._destroyInterceptor=function(){this._interceptor.destroy()},e.prototype._toggleFullScreen=function(){this._fullScreenManager.isInFullScreen?(this._fullScreenManager.exitFullScreen(),this._eventEmitter.emitAsync(i.UIEvent.EXIT_FULL_SCREEN_CLICK)):(this._fullScreenManager.enterFullScreen(),this._eventEmitter.emitAsync(i.UIEvent.ENTER_FULL_SCREEN_CLICK))},e.prototype.hide=function(){this.isHidden=!0,this.view.hide()},e.prototype.show=function(){this.isHidden=!1,this.view.show()},e.prototype.destroy=function(){this._destroyInterceptor(),this._unbindEvents(),this.view.destroy()},e.moduleName="fullScreenControl",e.View=s.default,e.dependencies=["eventEmitter","fullScreenManager","textMap","tooltipService","theme"],e}();t.default=a},50221:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={fullScreenSvgFill:{fill:function(e){return e.color}}}},67484:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(92712),i=n(24590),r=(0,o.__importDefault)(n(30313)),s=n(61608),a=(0,o.__importDefault)(n(61045)),l=(0,o.__importDefault)(n(46484)),u=(0,o.__importDefault)(n(50221)),c=(0,o.__importDefault)(n(30936)),d=function(e){function t(t){var n=this,o=t.callbacks,r=t.textMap,u=t.tooltipService,c=t.theme;return(n=e.call(this,c)||this)._callbacks=o,n._textMap=r,n._$rootElement=(0,a.default)((0,s.controlTemplate)({styles:n.styleNames,themeStyles:n.themeStyles,texts:{label:n._textMap.get(i.TextLabel.ENTER_FULL_SCREEN_LABEL)}})),n._$toggleFullScreenControl=(0,l.default)(n._$rootElement,"full-screen-button"),n._tooltipReference=u.createReference(n._$toggleFullScreenControl,{text:n._textMap.get(i.TextLabel.ENTER_FULL_SCREEN_TOOLTIP)}),n.setFullScreenState(!1),n._bindEvents(),n}return(0,o.__extends)(t,e),t.prototype._bindEvents=function(){this._onButtonClick=this._onButtonClick.bind(this),this._$toggleFullScreenControl.addEventListener("click",this._onButtonClick)},t.prototype._unbindEvents=function(){this._$toggleFullScreenControl.removeEventListener("click",this._onButtonClick)},t.prototype._onButtonClick=function(){this._$toggleFullScreenControl.focus(),this._callbacks.onButtonClick()},t.prototype.setFullScreenState=function(e){e?(this._$toggleFullScreenControl.classList.add(this.styleNames.inFullScreen),this._$toggleFullScreenControl.setAttribute("aria-label",this._textMap.get(i.TextLabel.EXIT_FULL_SCREEN_LABEL)),this._tooltipReference.setText(this._textMap.get(i.TextLabel.EXIT_FULL_SCREEN_TOOLTIP))):(this._$toggleFullScreenControl.classList.remove(this.styleNames.inFullScreen),this._$toggleFullScreenControl.setAttribute("aria-label",this._textMap.get(i.TextLabel.ENTER_FULL_SCREEN_LABEL)),this._tooltipReference.setText(this._textMap.get(i.TextLabel.ENTER_FULL_SCREEN_TOOLTIP)))},t.prototype.hide=function(){this._$rootElement.classList.add(this.styleNames.hidden)},t.prototype.show=function(){this._$rootElement.classList.remove(this.styleNames.hidden)},t.prototype.getElement=function(){return this._$rootElement},t.prototype.destroy=function(){this._unbindEvents(),this._tooltipReference.destroy(),this._$rootElement.parentNode&&this._$rootElement.parentNode.removeChild(this._$rootElement),this._$toggleFullScreenControl=null,this._$rootElement=null},t}(r.default);d.setTheme(u.default),d.extendStyleNames(c.default),t.default=d},3690:function(e){e.exports={__esModule:!0,default:function(e){return'
'}}},61608:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.controlTemplate=void 0;var o=(0,n(92712).__importDefault)(n(3690)),i=o.default.default?o.default.default:o.default;t.controlTemplate=i},95177:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(92712),i=(0,o.__importDefault)(n(17022)),r=(0,o.__importStar)(n(43450)),s=n(24590),a=(0,o.__importDefault)(n(51557)),l=function(){function e(e){var t=e.eventEmitter,n=e.textMap,o=e.tooltipService,i=e.theme;this._eventEmitter=t,this._textMap=n,this._theme=i,this._tooltipService=o,this._bindCallbacks(),this._initUI(),this._initInterceptor()}return e.prototype.getElement=function(){return this.view.getElement()},e.prototype._bindCallbacks=function(){this._triggerCallback=this._triggerCallback.bind(this)},e.prototype._initUI=function(){var t={theme:this._theme,callbacks:{onLogoClick:this._triggerCallback},textMap:this._textMap,tooltipService:this._tooltipService};this.view=new e.View(t)},e.prototype._initInterceptor=function(){var e,t=this;this._interceptor=new r.default(this.getElement(),((e={})[r.KEYCODES.SPACE_BAR]=function(e){e.stopPropagation(),t._eventEmitter.emitAsync(s.UIEvent.KEYBOARD_KEYDOWN_INTERCEPTED),t._triggerCallback()},e[r.KEYCODES.ENTER]=function(e){e.stopPropagation(),t._eventEmitter.emitAsync(s.UIEvent.KEYBOARD_KEYDOWN_INTERCEPTED),t._triggerCallback()},e))},e.prototype._destroyInterceptor=function(){this._interceptor.destroy()},e.prototype._triggerCallback=function(){this._callback&&this._callback()},e.prototype.setLogo=function(e){this._logoSrc=e,this.view.setLogo(this._logoSrc),this._setProperDisplayState()},e.prototype.setLogoClickCallback=function(e){this._callback=e,this._setProperDisplayState()},e.prototype._setProperDisplayState=function(){this._callback?this._logoSrc?this.view.showAsInput():this.view.showAsButton():this._logoSrc?this.view.showAsImage():this.view.showAsButton()},e.prototype.hide=function(){this.isHidden=!0,this.view.hide()},e.prototype.show=function(){this.isHidden=!1,this.view.show()},e.prototype.destroy=function(){this._destroyInterceptor(),this.view.destroy()},e.moduleName="logo",e.View=a.default,e.dependencies=["eventEmitter","textMap","tooltipService","theme"],(0,o.__decorate)([(0,i.default)()],e.prototype,"setLogo",null),(0,o.__decorate)([(0,i.default)()],e.prototype,"setLogoClickCallback",null),e}();t.default=l},72506:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={logoButtonSvgFill:{fill:function(e){return e.color}}}},51557:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(92712),i=n(24590),r=(0,o.__importDefault)(n(30313)),s=n(98147),a=(0,o.__importDefault)(n(61045)),l=(0,o.__importDefault)(n(72506)),u=(0,o.__importDefault)(n(51225)),c=function(e){function t(t){var n=this,o=t.callbacks,r=t.textMap,l=t.tooltipService,u=t.theme;return(n=e.call(this,u)||this)._callbacks=o,n._textMap=r,n._$rootElement=(0,a.default)((0,s.logoTemplate)({styles:n.styleNames,texts:{label:n._textMap.get(i.TextLabel.LOGO_LABEL)}})),n._$logoImage=(0,a.default)((0,s.logoImageTemplate)({styles:n.styleNames,texts:{label:n._textMap.get(i.TextLabel.LOGO_LABEL)}})),n._$logoInput=(0,a.default)((0,s.logoInputTemplate)({styles:n.styleNames,texts:{label:n._textMap.get(i.TextLabel.LOGO_LABEL)}})),n._$logoButton=(0,a.default)((0,s.logoButtonTemplate)({styles:n.styleNames,themeStyles:n.themeStyles,texts:{label:n._textMap.get(i.TextLabel.LOGO_LABEL)}})),n._tooltipReference=l.createReference(n._$rootElement,{text:n._textMap.get(i.TextLabel.LOGO_TOOLTIP)}),n.setLogo(t.logo),n._bindCallbacks(),n._bindEvents(),n.showAsButton(),n}return(0,o.__extends)(t,e),t.prototype.setLogo=function(e){e?(this._$logoImage.setAttribute("src",e),this._$logoInput.setAttribute("src",e)):(this._$logoImage.removeAttribute("src"),this._$logoInput.removeAttribute("src"))},t.prototype.showAsImage=function(){this._setChild(this._$logoImage),this._tooltipReference.disable()},t.prototype.showAsButton=function(){this._setChild(this._$logoButton),this._tooltipReference.enable()},t.prototype.showAsInput=function(){this._setChild(this._$logoInput),this._tooltipReference.enable()},t.prototype._setChild=function(e){this._$rootElement.firstChild&&this._$rootElement.removeChild(this._$rootElement.firstChild),this._$rootElement.appendChild(e)},t.prototype._bindCallbacks=function(){this._onClick=this._onClick.bind(this)},t.prototype._bindEvents=function(){this._$rootElement.addEventListener("click",this._onClick)},t.prototype._unbindEvents=function(){this._$rootElement.removeEventListener("click",this._onClick)},t.prototype._onClick=function(){this._$rootElement.focus(),this._callbacks.onLogoClick()},t.prototype.show=function(){this._$rootElement.classList.remove(this.styleNames.hidden)},t.prototype.hide=function(){this._$rootElement.classList.remove(this.styleNames.hidden)},t.prototype.getElement=function(){return this._$rootElement},t.prototype.destroy=function(){this._unbindEvents(),this._tooltipReference.destroy(),this._$rootElement.parentNode&&this._$rootElement.parentNode.removeChild(this._$rootElement),this._$rootElement=null,this._$logoImage=null,this._$logoInput=null,this._$logoButton=null},t}(r.default);c.setTheme(l.default),c.extendStyleNames(u.default),t.default=c},98147:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.logoInputTemplate=t.logoButtonTemplate=t.logoImageTemplate=t.logoTemplate=void 0;var o=n(92712),i=(0,o.__importDefault)(n(54169)),r=(0,o.__importDefault)(n(91598)),s=(0,o.__importDefault)(n(42154)),a=(0,o.__importDefault)(n(75178)),l=i.default.default?i.default.default:i.default;t.logoTemplate=l;var u=r.default.default?r.default.default:r.default;t.logoImageTemplate=u;var c=s.default.default?s.default.default:s.default;t.logoInputTemplate=c;var d=a.default.default?a.default.default:a.default;t.logoButtonTemplate=d},75178:function(e){e.exports={__esModule:!0,default:function(e){return''}}},91598:function(e){e.exports={__esModule:!0,default:function(e){return''}}},42154:function(e){e.exports={__esModule:!0,default:function(e){return''}}},54169:function(e){e.exports={__esModule:!0,default:function(e){return'
'}}},50902:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(92712),i=n(24590),r=(0,o.__importStar)(n(43450)),s=(0,o.__importDefault)(n(78589)),a=function(){function e(e){var t=e.eventEmitter,n=e.pictureInPicture,o=e.textMap,i=e.tooltipService,r=e.theme;this._eventEmitter=t,this._pictureInPictureManager=n,this._textMap=o,this._theme=r,this._tooltipService=i,this._bindCallbacks(),this._initUI(),this._bindEvents(),this._pictureInPictureManager.isEnabled||this.hide(),this._initInterceptor()}return e.prototype.getElement=function(){return this.view.getElement()},e.prototype._bindCallbacks=function(){this._togglePictureInPicture=this._togglePictureInPicture.bind(this)},e.prototype._bindEvents=function(){this._unbindEvents=this._eventEmitter.bindEvents([[i.UIEvent.PICTURE_IN_PICTURE_STATUS_CHANGE,this.view.setPictureInPictureState]],this.view)},e.prototype._initUI=function(){var t={callbacks:{onButtonClick:this._togglePictureInPicture},textMap:this._textMap,tooltipService:this._tooltipService,theme:this._theme};this.view=new e.View(t)},e.prototype._initInterceptor=function(){var e,t=this;this._interceptor=new r.default(this.getElement(),((e={})[r.KEYCODES.SPACE_BAR]=function(e){e.stopPropagation(),t._eventEmitter.emitAsync(i.UIEvent.KEYBOARD_KEYDOWN_INTERCEPTED)},e[r.KEYCODES.ENTER]=function(e){e.stopPropagation(),t._eventEmitter.emitAsync(i.UIEvent.KEYBOARD_KEYDOWN_INTERCEPTED)},e))},e.prototype._destroyInterceptor=function(){this._interceptor.destroy()},e.prototype._togglePictureInPicture=function(){this._pictureInPictureManager.isInPictureInPicture?(this._pictureInPictureManager.exitPictureInPicture(),this._eventEmitter.emitAsync(i.UIEvent.EXIT_PICTURE_IN_PICTURE_CLICK)):(this._pictureInPictureManager.enterPictureInPicture(),this._eventEmitter.emitAsync(i.UIEvent.ENTER_PICTURE_IN_PICTURE_CLICK))},e.prototype.hide=function(){this.isHidden=!0,this.view.hide()},e.prototype.show=function(){this.isHidden=!1,this.view.show()},e.prototype.destroy=function(){this._destroyInterceptor(),this._unbindEvents(),this.view.destroy()},e.moduleName="pictureInPictureControl",e.View=s.default,e.dependencies=["eventEmitter","pictureInPicture","textMap","tooltipService","theme"],e}();t.default=a},12403:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={pictureInPictureSvgFill:{fill:function(e){return e.color}}}},78589:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(92712),i=n(24590),r=(0,o.__importDefault)(n(30313)),s=n(20610),a=(0,o.__importDefault)(n(61045)),l=(0,o.__importDefault)(n(46484)),u=(0,o.__importDefault)(n(12403)),c=(0,o.__importDefault)(n(42836)),d=function(e){function t(t){var n=this,o=t.callbacks,r=t.textMap,u=t.tooltipService,c=t.theme;return(n=e.call(this,c)||this)._callbacks=o,n._textMap=r,n._$rootElement=(0,a.default)((0,s.controlTemplate)({styles:n.styleNames,themeStyles:n.themeStyles,texts:{label:n._textMap.get(i.TextLabel.ENTER_PICTURE_IN_PICTURE_LABEL)}})),n._$togglePictureInPictureControl=(0,l.default)(n._$rootElement,"picture-in-picture-control"),n._tooltipReference=u.createReference(n._$togglePictureInPictureControl,{text:n._textMap.get(i.TextLabel.ENTER_PICTURE_IN_PICTURE_TOOLTIP)}),n.setPictureInPictureState(!1),n._bindEvents(),n}return(0,o.__extends)(t,e),t.prototype._bindEvents=function(){this._onButtonClick=this._onButtonClick.bind(this),this._$togglePictureInPictureControl.addEventListener("click",this._onButtonClick)},t.prototype._unbindEvents=function(){this._$togglePictureInPictureControl.removeEventListener("click",this._onButtonClick)},t.prototype._onButtonClick=function(){this._callbacks.onButtonClick()},t.prototype.setPictureInPictureState=function(e){e?(this._$togglePictureInPictureControl.classList.add(this.styleNames.inPictureInPicture),this._$togglePictureInPictureControl.setAttribute("aria-label",this._textMap.get(i.TextLabel.EXIT_PICTURE_IN_PICTURE_LABEL)),this._tooltipReference.setText(this._textMap.get(i.TextLabel.EXIT_PICTURE_IN_PICTURE_TOOLTIP))):(this._$togglePictureInPictureControl.classList.remove(this.styleNames.inPictureInPicture),this._$togglePictureInPictureControl.setAttribute("aria-label",this._textMap.get(i.TextLabel.ENTER_PICTURE_IN_PICTURE_LABEL)),this._tooltipReference.setText(this._textMap.get(i.TextLabel.ENTER_PICTURE_IN_PICTURE_TOOLTIP)))},t.prototype.hide=function(){this._$rootElement.classList.add(this.styleNames.hidden)},t.prototype.show=function(){this._$rootElement.classList.remove(this.styleNames.hidden)},t.prototype.getElement=function(){return this._$rootElement},t.prototype.destroy=function(){this._unbindEvents(),this._tooltipReference.destroy(),this._$rootElement.parentNode&&this._$rootElement.parentNode.removeChild(this._$rootElement),this._$togglePictureInPictureControl=null,this._$rootElement=null},t}(r.default);d.setTheme(u.default),d.extendStyleNames(c.default),t.default=d},9109:function(e){e.exports={__esModule:!0,default:function(e){return'
'}}},20610:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.controlTemplate=void 0;var o=(0,n(92712).__importDefault)(n(9109)),i=o.default.default?o.default.default:o.default;t.controlTemplate=i},80997:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(92712),i=(0,o.__importDefault)(n(76294)),r=(0,o.__importStar)(n(43450)),s=n(24590),a=function(){function e(e){var t=e.engine,n=e.eventEmitter,o=e.textMap,i=e.theme;this._engine=t,this._eventEmitter=n,this._textMap=o,this._theme=i,this._bindCallbacks(),this._initUI(),this._bindEvents(),this._initInterceptor()}return e.prototype.getElement=function(){return this.view.getElement()},e.prototype._initInterceptor=function(){var e,t=this;this._interceptor=new r.default(this.getElement(),((e={})[r.KEYCODES.SPACE_BAR]=function(e){e.stopPropagation(),t._eventEmitter.emitAsync(s.UIEvent.TOGGLE_PLAYBACK_WITH_KEYBOARD)},e[r.KEYCODES.ENTER]=function(e){e.stopPropagation(),t._eventEmitter.emitAsync(s.UIEvent.TOGGLE_PLAYBACK_WITH_KEYBOARD)},e))},e.prototype._destroyInterceptor=function(){this._interceptor.destroy()},e.prototype._bindCallbacks=function(){this._togglePlayback=this._togglePlayback.bind(this)},e.prototype._bindEvents=function(){this._unbindEvents=this._eventEmitter.bindEvents([[s.VideoEvent.STATE_CHANGED,this._updatePlayingState]],this)},e.prototype._togglePlayback=function(){this._engine.isPaused?this._playVideo():this._pauseVideo()},e.prototype._playVideo=function(){this._engine.play(),this._eventEmitter.emitAsync(s.UIEvent.PLAY_CLICK)},e.prototype._pauseVideo=function(){this._engine.pause(),this._eventEmitter.emitAsync(s.UIEvent.PAUSE_CLICK)},e.prototype._updatePlayingState=function(){this.view.setPlayingState(!this._engine.isPaused)},e.prototype._initUI=function(){var t={callbacks:{onButtonClick:this._togglePlayback},theme:this._theme,textMap:this._textMap};this.view=new e.View(t)},e.prototype.destroy=function(){this._destroyInterceptor(),this._unbindEvents(),this.view.destroy()},e.moduleName="playControl",e.View=i.default,e.dependencies=["engine","eventEmitter","textMap","theme"],e}();t.default=a},87443:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={playSvgFill:{fill:function(e){return e.color}}}},76294:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(92712),i=n(24590),r=(0,o.__importDefault)(n(30313)),s=n(98479),a=(0,o.__importDefault)(n(61045)),l=(0,o.__importDefault)(n(46484)),u=(0,o.__importDefault)(n(87443)),c=(0,o.__importDefault)(n(67449)),d=function(e){function t(t){var n=this,o=t.callbacks,r=t.textMap,u=t.theme;return(n=e.call(this,u)||this)._callbacks=o,n._textMap=r,n._$rootElement=(0,a.default)((0,s.controlTemplate)({styles:n.styleNames,themeStyles:n.themeStyles,texts:{label:n._textMap.get(i.TextLabel.PLAY_CONTROL_LABEL)}})),n._$playbackControl=(0,l.default)(n._$rootElement,"playback-control"),n.setPlayingState(!1),n._bindEvents(),n}return(0,o.__extends)(t,e),t.prototype._bindEvents=function(){this._onButtonClick=this._onButtonClick.bind(this),this._$playbackControl.addEventListener("click",this._onButtonClick)},t.prototype._unbindEvents=function(){this._$playbackControl.removeEventListener("click",this._onButtonClick)},t.prototype._onButtonClick=function(){this._$playbackControl.focus(),this._callbacks.onButtonClick()},t.prototype.setPlayingState=function(e){e?(this._$playbackControl.classList.remove(this.styleNames.paused),this._$playbackControl.setAttribute("aria-label",this._textMap.get(i.TextLabel.PAUSE_CONTROL_LABEL))):(this._$playbackControl.classList.add(this.styleNames.paused),this._$playbackControl.setAttribute("aria-label",this._textMap.get(i.TextLabel.PLAY_CONTROL_LABEL))),this._$rootElement.setAttribute("data-playable-is-playing",String(e))},t.prototype.show=function(){this._$rootElement.classList.remove(this.styleNames.hidden)},t.prototype.hide=function(){this._$rootElement.classList.add(this.styleNames.hidden)},t.prototype.getElement=function(){return this._$rootElement},t.prototype.destroy=function(){this._unbindEvents(),this._$rootElement.parentNode&&this._$rootElement.parentNode.removeChild(this._$rootElement),this._$playbackControl=null,this._$rootElement=null},t}(r.default);d.setTheme(u.default),d.extendStyleNames(c.default),t.default=d},416:function(e){e.exports={__esModule:!0,default:function(e){return'
'}}},98479:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.controlTemplate=void 0;var o=(0,n(92712).__importDefault)(n(416)),i=o.default.default?o.default.default:o.default;t.controlTemplate=i},40796:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UPDATE_PROGRESS_INTERVAL_DELAY=void 0;var o=n(92712),i=(0,o.__importDefault)(n(83664)),r=n(91211),s=n(24590),a=n(66045),l=(0,o.__importStar)(n(43450)),u=(0,o.__importDefault)(n(45264)),c=(0,o.__importDefault)(n(17022));t.UPDATE_PROGRESS_INTERVAL_DELAY=1e3/60;var d=function(){function e(e){var t=e.engine,n=e.liveStateEngine,o=e.eventEmitter,i=e.textMap,r=e.tooltipService,s=e.theme,a=e.previewThumbnail,l=e.previewFullSize;this._engine=t,this._liveStateEngine=n,this._eventEmitter=o,this._textMap=i,this._tooltipService=r,this._previewThumbnail=a,this._previewFullSize=l,this._isUserDragging=!1,this._desiredSeekPosition=0,this._theme=s,this._timeIndicatorsToAdd=[],this._showFullScreenPreview=!1,this._bindCallbacks(),this._initUI(),this._bindEvents(),this.view.setPlayed(0),this.view.setBuffered(0),this._initInterceptor()}return e.prototype.getElement=function(){return this.view.getElement()},e.prototype._bindEvents=function(){this._unbindEvents=this._eventEmitter.bindEvents([[s.VideoEvent.STATE_CHANGED,this._processStateChange],[s.VideoEvent.LIVE_STATE_CHANGED,this._processLiveStateChange],[s.VideoEvent.CHUNK_LOADED,this._updateBufferIndicator],[s.VideoEvent.DURATION_UPDATED,this._updateAllIndicators],[s.UIEvent.RESIZE,this.view.updateOnResize,this.view]],this)},e.prototype._initUI=function(){var t={callbacks:{onSyncWithLiveClick:this._syncWithLive,onSyncWithLiveMouseEnter:this._onSyncWithLiveMouseEnter,onSyncWithLiveMouseLeave:this._onSyncWithLiveMouseLeave,onChangePlayedPercent:this._onChangePlayedPercent,onSeekToByMouseStart:this._showTooltipAndPreview,onSeekToByMouseEnd:this._hideTooltip,onDragStart:this._startProcessingUserDrag,onDragEnd:this._stopProcessingUserDrag},theme:this._theme,textMap:this._textMap,tooltipService:this._tooltipService};this.view=new e.View(t)},e.prototype._initInterceptor=function(){var e,t=this;this._interceptor=new l.default(this.view.getElement(),((e={})[l.KEYCODES.UP_ARROW]=function(e){e.stopPropagation(),e.preventDefault(),t._eventEmitter.emitAsync(s.UIEvent.KEYBOARD_KEYDOWN_INTERCEPTED),t._eventEmitter.emitAsync(s.UIEvent.GO_FORWARD_WITH_KEYBOARD),t._engine.seekForward(a.AMOUNT_TO_SKIP_SECONDS)},e[l.KEYCODES.DOWN_ARROW]=function(e){e.stopPropagation(),e.preventDefault(),t._eventEmitter.emitAsync(s.UIEvent.KEYBOARD_KEYDOWN_INTERCEPTED),t._eventEmitter.emitAsync(s.UIEvent.GO_BACKWARD_WITH_KEYBOARD),t._engine.seekBackward(a.AMOUNT_TO_SKIP_SECONDS)},e[l.KEYCODES.RIGHT_ARROW]=function(e){e.stopPropagation(),e.preventDefault(),t._eventEmitter.emitAsync(s.UIEvent.KEYBOARD_KEYDOWN_INTERCEPTED),t._eventEmitter.emitAsync(s.UIEvent.GO_FORWARD_WITH_KEYBOARD),t._engine.seekForward(a.AMOUNT_TO_SKIP_SECONDS)},e[l.KEYCODES.LEFT_ARROW]=function(e){e.stopPropagation(),e.preventDefault(),t._eventEmitter.emitAsync(s.UIEvent.KEYBOARD_KEYDOWN_INTERCEPTED),t._eventEmitter.emitAsync(s.UIEvent.GO_BACKWARD_WITH_KEYBOARD),t._engine.seekBackward(a.AMOUNT_TO_SKIP_SECONDS)},e))},e.prototype._destroyInterceptor=function(){this._interceptor.destroy()},e.prototype._bindCallbacks=function(){this._syncWithLive=this._syncWithLive.bind(this),this._onSyncWithLiveMouseEnter=this._onSyncWithLiveMouseEnter.bind(this),this._onSyncWithLiveMouseLeave=this._onSyncWithLiveMouseLeave.bind(this),this._updateAllIndicators=this._updateAllIndicators.bind(this),this._onChangePlayedPercent=this._onChangePlayedPercent.bind(this),this._showTooltipAndPreview=this._showTooltipAndPreview.bind(this),this._hideTooltip=this._hideTooltip.bind(this),this._startProcessingUserDrag=this._startProcessingUserDrag.bind(this),this._stopProcessingUserDrag=this._stopProcessingUserDrag.bind(this)},e.prototype._startIntervalUpdates=function(){this._updateControlInterval&&this._stopIntervalUpdates(),this._updateAllIndicators(),this._updateControlInterval=window.setInterval(this._updateAllIndicators,t.UPDATE_PROGRESS_INTERVAL_DELAY)},e.prototype._stopIntervalUpdates=function(){window.clearInterval(this._updateControlInterval),this._updateControlInterval=null},e.prototype._convertPlayedPercentToTime=function(e){return this._engine.getDuration()*e/100},e.prototype._onChangePlayedPercent=function(e){var t=this._convertPlayedPercentToTime(e);this._showFullScreenPreview?(this._desiredSeekPosition=t,this._eventEmitter.emitAsync(s.UIEvent.PROGRESS_USER_PREVIEWING_FRAME,t)):this._changeCurrentTimeOfVideo(t),this._isUserDragging&&this._showTooltipAndPreview(e)},e.prototype._showTooltipAndPreview=function(e){var t=this._engine.getDuration(),n=this._convertPlayedPercentToTime(e),o=this._engine.isDynamicContent?n-t:n;this._previewThumbnail.setTime((0,u.default)(o)),this._previewThumbnail.showAt(n),this.view.showProgressTimeTooltip(this._previewThumbnail.getElement(),e),this._isUserDragging&&this._showFullScreenPreview&&this._previewFullSize.showAt(n)},e.prototype._hideTooltip=function(){this._isUserDragging||this.view.hideProgressTimeTooltip()},e.prototype._startProcessingUserDrag=function(){this._isUserDragging||(this._isUserDragging=!0,this._pauseVideoOnDragStart(),this._eventEmitter.emitAsync(s.UIEvent.PROGRESS_DRAG_STARTED),this._eventEmitter.emitAsync(s.UIEvent.CONTROL_DRAG_START))},e.prototype._stopProcessingUserDrag=function(){this._isUserDragging&&(this._isUserDragging=!1,this._showFullScreenPreview&&(this._shouldHidePreviewOnUpdate=!0),this._showFullScreenPreview&&this._changeCurrentTimeOfVideo(this._desiredSeekPosition),this._playVideoOnDragEnd(),this.view.hideProgressTimeTooltip(),this._eventEmitter.emitAsync(s.UIEvent.PROGRESS_DRAG_ENDED),this._eventEmitter.emitAsync(s.UIEvent.CONTROL_DRAG_END))},e.prototype._hidePreview=function(){this._shouldHidePreviewOnUpdate=!1,this._previewFullSize.hide()},e.prototype._processStateChange=function(e){switch(e.nextState){case s.EngineState.SRC_SET:this._reset();break;case s.EngineState.METADATA_LOADED:this._initTimeIndicators(),this._engine.isSeekAvailable?this.show():this.hide();break;case s.EngineState.PLAYING:this._shouldHidePreviewOnUpdate&&this._hidePreview(),this._liveStateEngine.state===s.LiveState.SYNC?this.view.setPlayed(100):this._startIntervalUpdates();break;case s.EngineState.PAUSED:this._shouldHidePreviewOnUpdate&&this._hidePreview(),this._stopIntervalUpdates();break;case s.EngineState.SEEK_IN_PROGRESS:this._updateAllIndicators()}},e.prototype._processLiveStateChange=function(e){switch(e.nextState){case s.LiveState.NONE:this.view.setLiveSyncState(!1),this.view.setUsualMode();break;case s.LiveState.INITIAL:this.view.setLiveMode();break;case s.LiveState.SYNC:this.view.setLiveSyncState(!0);break;case s.LiveState.NOT_SYNC:this.view.setLiveSyncState(!1);break;case s.LiveState.ENDED:this.view.setLiveSyncState(!1),this.view.hideSyncWithLive(),this._engine.getCurrentState()===s.EngineState.PLAYING?this._startIntervalUpdates():this._updateAllIndicators()}},e.prototype._changeCurrentTimeOfVideo=function(e){var t=this._engine.getDuration();this._engine.isDynamicContent&&t===e?this._engine.syncWithLive():this._engine.seekTo(e),this._eventEmitter.emitAsync(s.UIEvent.PROGRESS_CHANGE,e)},e.prototype._pauseVideoOnDragStart=function(){var e=this._engine.getCurrentState();e!==s.EngineState.PLAYING&&e!==s.EngineState.PLAY_REQUESTED||(this._shouldPlayAfterDragEnd=!0,this._engine.pause()),this._eventEmitter.emitAsync(s.UIEvent.PROGRESS_DRAG_STARTED)},e.prototype._playVideoOnDragEnd=function(){this._shouldPlayAfterDragEnd&&(this._engine.play(),this._shouldPlayAfterDragEnd=!1)},e.prototype._updateBufferIndicator=function(){var e=this._engine.getCurrentTime(),t=this._engine.getBuffered(),n=this._engine.getDuration();this._setBuffered((0,r.getOverallBufferedPercent)(t,e,n))},e.prototype._updatePlayedIndicator=function(){if(this._liveStateEngine.state!==s.LiveState.SYNC){var e=this._engine.getCurrentTime(),t=this._engine.getDuration();this._setPlayed((0,r.getOverallPlayedPercent)(e,t))}},e.prototype._updateAllIndicators=function(){this._updatePlayedIndicator(),this._updateBufferIndicator()},e.prototype._initTimeIndicators=function(){var e=this;this._timeIndicatorsToAdd.forEach((function(t){e._addTimeIndicator(t)})),this._timeIndicatorsToAdd=[]},e.prototype._addTimeIndicator=function(e){var t=this._engine.getDuration();e>t||this.view.addTimeIndicator((0,r.getTimePercent)(e,t))},e.prototype._syncWithLive=function(){this._engine.syncWithLive()},e.prototype._onSyncWithLiveMouseEnter=function(){this._eventEmitter.emitAsync(s.UIEvent.PROGRESS_SYNC_BUTTON_MOUSE_ENTER)},e.prototype._onSyncWithLiveMouseLeave=function(){this._eventEmitter.emitAsync(s.UIEvent.PROGRESS_SYNC_BUTTON_MOUSE_LEAVE)},e.prototype._setPlayed=function(e){this.view.setPlayed(e)},e.prototype._setBuffered=function(e){this.view.setBuffered(e)},e.prototype._reset=function(){this._setPlayed(0),this._setBuffered(0),this.clearTimeIndicators()},e.prototype.showPreviewOnProgressDrag=function(){this._showFullScreenPreview=!0},e.prototype.seekOnProgressDrag=function(){this._showFullScreenPreview=!1},e.prototype.addTimeIndicator=function(e){this.addTimeIndicators([e])},e.prototype.addTimeIndicators=function(e){var t,n=this;this._engine.isMetadataLoaded?e.forEach((function(e){n._addTimeIndicator(e)})):(t=this._timeIndicatorsToAdd).push.apply(t,e)},e.prototype.clearTimeIndicators=function(){this.view.clearTimeIndicators()},e.prototype.hide=function(){this.isHidden=!0,this.view.hide()},e.prototype.show=function(){this.isHidden=!1,this.view.show()},e.prototype.destroy=function(){this._destroyInterceptor(),this._stopIntervalUpdates(),this._unbindEvents(),this.view.destroy()},e.moduleName="progressControl",e.View=i.default,e.dependencies=["engine","liveStateEngine","eventEmitter","textMap","tooltipService","theme","previewThumbnail","previewFullSize"],(0,o.__decorate)([(0,c.default)()],e.prototype,"showPreviewOnProgressDrag",null),(0,o.__decorate)([(0,c.default)()],e.prototype,"seekOnProgressDrag",null),(0,o.__decorate)([(0,c.default)()],e.prototype,"addTimeIndicator",null),(0,o.__decorate)([(0,c.default)()],e.prototype,"addTimeIndicators",null),(0,o.__decorate)([(0,c.default)()],e.prototype,"clearTimeIndicators",null),e}();t.default=d},61865:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(52892);t.default={progressPlayed:{backgroundColor:function(e){return e.progressColor}},progressSeekTo:{backgroundColor:function(e){return(0,o.transperentizeColor)(e.progressColor,.5)}},progressSeekBtn:{backgroundColor:function(e){return e.progressColor}}}},83664:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(92712),i=n(24590),r=(0,o.__importDefault)(n(30313)),s=(0,o.__importDefault)(n(73170)),a=n(72226),l=(0,o.__importDefault)(n(61045)),u=(0,o.__importDefault)(n(46484)),c=(0,o.__importDefault)(n(23802)),d=(0,o.__importDefault)(n(61865)),p=(0,o.__importDefault)(n(85519)),h=function(e,t){var n=t.getBoundingClientRect(),o=e.clientX;return on.left+n.width?100:(e.clientX-n.left)/n.width*100},_=function(e){function t(t){var n=this,o=t.callbacks,i=t.textMap,r=t.tooltipService,s=t.theme;return(n=e.call(this,s)||this)._callbacks=o,n._textMap=i,n._tooltipService=r,n._initDOM(),n._bindCallbacks(),n._bindEvents(),n._setPlayedDOMAttributes(0),n._setBufferedDOMAttributes(0),n.setUsualMode(),n}return(0,o.__extends)(t,e),t.prototype._initDOM=function(){this._$rootElement=(0,l.default)((0,a.progressTemplate)({styles:this.styleNames,themeStyles:this.themeStyles})),this._$played=(0,u.default)(this._$rootElement,"progress-played"),this._$buffered=(0,u.default)(this._$rootElement,"progress-buffered"),this._$seekTo=(0,u.default)(this._$rootElement,"progress-seek-to"),this._$timeIndicators=(0,u.default)(this._$rootElement,"progress-time-indicators"),this._$seekButton=(0,u.default)(this._$rootElement,"progress-seek-button"),this._$syncButton=(0,u.default)(this._$rootElement,"progress-sync-button"),this._syncButtonTooltipReference=this._tooltipService.createReference(this._$syncButton,{text:this._textMap.get(i.TextLabel.LIVE_SYNC_TOOLTIP)}),this._$hitbox=(0,u.default)(this._$rootElement,"progress-hitbox")},t.prototype._bindCallbacks=function(){this._setPlayedByDrag=this._setPlayedByDrag.bind(this),this._startDragOnMouseDown=this._startDragOnMouseDown.bind(this),this._stopDragOnMouseUp=this._stopDragOnMouseUp.bind(this),this._startSeekToByMouse=this._startSeekToByMouse.bind(this),this._stopSeekToByMouse=this._stopSeekToByMouse.bind(this),this._syncWithLive=this._syncWithLive.bind(this)},t.prototype._bindEvents=function(){this._$seekButton.addEventListener("mousedown",this._startDragOnMouseDown),this._$seekButton.addEventListener("mousemove",this._startSeekToByMouse),this._$seekButton.addEventListener("mouseout",this._stopSeekToByMouse),this._$hitbox.addEventListener("mousedown",this._startDragOnMouseDown),this._$hitbox.addEventListener("mousemove",this._startSeekToByMouse),this._$hitbox.addEventListener("mouseout",this._stopSeekToByMouse),window.addEventListener("mousemove",this._setPlayedByDrag),window.addEventListener("mouseup",this._stopDragOnMouseUp),this._$syncButton.addEventListener("click",this._syncWithLive),this._$syncButton.addEventListener("mouseenter",this._callbacks.onSyncWithLiveMouseEnter),this._$syncButton.addEventListener("mouseleave",this._callbacks.onSyncWithLiveMouseLeave)},t.prototype._unbindEvents=function(){this._$seekButton.removeEventListener("mousedown",this._startDragOnMouseDown),this._$seekButton.removeEventListener("mousemove",this._startSeekToByMouse),this._$seekButton.removeEventListener("mouseout",this._stopSeekToByMouse),this._$hitbox.removeEventListener("mousedown",this._startDragOnMouseDown),this._$hitbox.removeEventListener("mousemove",this._startSeekToByMouse),this._$hitbox.removeEventListener("mouseout",this._stopSeekToByMouse),window.removeEventListener("mousemove",this._setPlayedByDrag),window.removeEventListener("mouseup",this._stopDragOnMouseUp),this._$syncButton.removeEventListener("click",this._syncWithLive),this._$syncButton.removeEventListener("mouseenter",this._callbacks.onSyncWithLiveMouseEnter),this._$syncButton.removeEventListener("mouseleave",this._callbacks.onSyncWithLiveMouseLeave)},t.prototype._startDragOnMouseDown=function(e){if(!(e.button>1)){var t=h(e,this._$hitbox);this._setPlayedDOMAttributes(t),this._callbacks.onChangePlayedPercent(t),this._startDrag()}},t.prototype._stopDragOnMouseUp=function(e){e.button>1||this._stopDrag()},t.prototype._startSeekToByMouse=function(e){var t=h(e,this._$hitbox);this._setSeekToDOMAttributes(t),this._callbacks.onSeekToByMouseStart(t)},t.prototype._stopSeekToByMouse=function(){this._setSeekToDOMAttributes(0),this._callbacks.onSeekToByMouseEnd()},t.prototype._setPlayedByDrag=function(e){if(this._isDragging){var t=h(e,this._$hitbox);this._setPlayedDOMAttributes(t),this._callbacks.onChangePlayedPercent(t)}},t.prototype._startDrag=function(){this._isDragging=!0,this._callbacks.onDragStart(),this._$rootElement.classList.add(this.styleNames.isDragging)},t.prototype._stopDrag=function(){this._isDragging&&(this._isDragging=!1,this._callbacks.onDragEnd(),this._$rootElement.classList.remove(this.styleNames.isDragging))},t.prototype._setSeekToDOMAttributes=function(e){this._$seekTo.setAttribute("style","width:".concat(e,"%;"))},t.prototype._setPlayedDOMAttributes=function(e){this._$rootElement.setAttribute("aria-valuetext",this._textMap.get(i.TextLabel.PROGRESS_CONTROL_VALUE,{percent:e})),this._$rootElement.setAttribute("aria-valuenow",e.toFixed(2)),this._$rootElement.setAttribute("data-playable-played-percent",e.toFixed(2)),this._setPlayedDOMPosition(e)},t.prototype._setPlayedDOMPosition=function(e){var t=e/100,n=this._$rootElement.getBoundingClientRect().width*t;this._$played.style.transform="scaleX(".concat(t.toFixed(3),")"),this._$seekButton.style.transform="translateX(".concat(n.toFixed(3),"px)")},t.prototype._setBufferedDOMAttributes=function(e){this._$buffered.setAttribute("style","width:".concat(e,"%;"))},t.prototype._syncWithLive=function(){this._callbacks.onSyncWithLiveClick()},t.prototype.updateOnResize=function(){this._setPlayedDOMPosition(this._currentPlayedPercent)},t.prototype.showSyncWithLive=function(){this._$syncButton.classList.remove(this.styleNames.hidden)},t.prototype.hideSyncWithLive=function(){this._$syncButton.classList.add(this.styleNames.hidden)},t.prototype.setLiveSyncState=function(e){(0,c.default)(this._$syncButton,this.styleNames.liveSync,e),(0,c.default)(this._$seekButton,this.styleNames.liveSync,e),e?(this._syncButtonTooltipReference.disable(),this._$played.setAttribute("style","width:100%;")):this._syncButtonTooltipReference.enable()},t.prototype.showProgressTimeTooltip=function(e,t){var n=this;this._tooltipService.show({element:e,position:function(e){return(0,s.default)(t,n._$hitbox,e)}})},t.prototype.hideProgressTimeTooltip=function(){this._tooltipService.hide()},t.prototype.setLiveMode=function(){this._$rootElement.classList.add(this.styleNames.inLive),this.showSyncWithLive()},t.prototype.setUsualMode=function(){this._$rootElement.classList.remove(this.styleNames.inLive),this.hideSyncWithLive()},t.prototype.setPlayed=function(e){this._currentPlayedPercent=e,this._setPlayedDOMAttributes(e)},t.prototype.setBuffered=function(e){this._setBufferedDOMAttributes(e)},t.prototype.addTimeIndicator=function(e){this._$timeIndicators.appendChild((0,l.default)((0,a.progressTimeIndicatorTemplate)({percent:e,styles:this.styleNames})))},t.prototype.clearTimeIndicators=function(){this._$timeIndicators.innerHTML=""},t.prototype.hide=function(){this._$rootElement.classList.add(this.styleNames.hidden)},t.prototype.show=function(){this._$rootElement.classList.remove(this.styleNames.hidden)},t.prototype.getElement=function(){return this._$rootElement},t.prototype.destroy=function(){this._unbindEvents(),this._syncButtonTooltipReference.destroy(),this._$rootElement.parentNode&&this._$rootElement.parentNode.removeChild(this._$rootElement),this._$rootElement=null,this._$buffered=null,this._$hitbox=null,this._$played=null,this._$seekTo=null,this._$seekButton=null,this._$syncButton=null,this._$timeIndicators=null},t}(r.default);_.setTheme(d.default),_.extendStyleNames(p.default),t.default=_},72226:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.progressTimeIndicatorTemplate=t.progressTemplate=void 0;var o=n(92712),i=(0,o.__importDefault)(n(5102)),r=(0,o.__importDefault)(n(75517)),s=i.default.default?i.default.default:i.default;t.progressTemplate=s;var a=r.default.default?r.default.default:r.default;t.progressTimeIndicatorTemplate=a},5102:function(e){e.exports={__esModule:!0,default:function(e){return'
'}}},75517:function(e){e.exports={__esModule:!0,default:function(e){return'
'}}},73170:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(33620);t.default=function(e,t,n){return(0,o.getTooltipPositionByReferenceElement)(t,n,(function(t,n){return function(e,t,n){return t+e*n/100}(e,t,n)}))}},35574:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.timeTemplate=void 0;var o=(0,n(92712).__importDefault)(n(22951)),i=o.default.default?o.default.default:o.default;t.timeTemplate=i},22951:function(e){e.exports={__esModule:!0,default:function(e){return'
'}}},41624:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UPDATE_TIME_INTERVAL_DELAY=void 0;var o=(0,n(92712).__importDefault)(n(7562)),i=n(24590);t.UPDATE_TIME_INTERVAL_DELAY=1e3/60;var r=function(){function e(e){var t=e.eventEmitter,n=e.engine,o=e.theme;this._eventEmitter=t,this._engine=n,this._theme=o,this._bindCallbacks(),this._initUI(),this._bindEvents(),this._setCurrentTime(0),this._setDurationTime(0)}return e.prototype.getElement=function(){return this.view.getElement()},e.prototype._bindCallbacks=function(){this._updateCurrentTime=this._updateCurrentTime.bind(this),this._updateDurationTime=this._updateDurationTime.bind(this)},e.prototype._bindEvents=function(){this._unbindEvents=this._eventEmitter.bindEvents([[i.UIEvent.PROGRESS_USER_PREVIEWING_FRAME,this._updateTimeFromPreview],[i.VideoEvent.STATE_CHANGED,this._toggleIntervalUpdates],[i.VideoEvent.DURATION_UPDATED,this._updateDurationTime],[i.VideoEvent.LIVE_STATE_CHANGED,this._processLiveStateChange]],this)},e.prototype._initUI=function(){var t={theme:this._theme};this.view=new e.View(t)},e.prototype._startIntervalUpdates=function(){this._updateControlInterval&&this._stopIntervalUpdates(),this._updateCurrentTime(),this._updateControlInterval=window.setInterval(this._updateCurrentTime,t.UPDATE_TIME_INTERVAL_DELAY)},e.prototype._stopIntervalUpdates=function(){window.clearInterval(this._updateControlInterval),this._updateControlInterval=null},e.prototype._processLiveStateChange=function(e){switch(e.nextState){case i.LiveState.NONE:this.show();break;case i.LiveState.INITIAL:this.hide();break;case i.LiveState.ENDED:this.show()}},e.prototype._toggleIntervalUpdates=function(e){switch(e.nextState){case i.EngineState.SRC_SET:this.reset();break;case i.EngineState.PLAYING:case i.EngineState.SEEK_IN_PROGRESS:this._startIntervalUpdates();break;default:this._stopIntervalUpdates()}},e.prototype._updateDurationTime=function(){this._setDurationTime(this._engine.getDuration())},e.prototype._updateCurrentTime=function(){var e=this._engine.getCurrentTime();this._setCurrentTime(e)},e.prototype._updateTimeFromPreview=function(e){this.view.setCurrentTime(e)},e.prototype._setDurationTime=function(e){this.view.setDurationTime(e)},e.prototype._setCurrentTime=function(e){this.view.setCurrentTime(e)},e.prototype.hide=function(){this.isHidden=!0,this.view.hide()},e.prototype.show=function(){this.isHidden=!1,this.view.show()},e.prototype.reset=function(){this._setDurationTime(0),this._setCurrentTime(0),this.view.showDuration(),this.view.setCurrentTimeBackward(!1),this.show()},e.prototype.destroy=function(){this._stopIntervalUpdates(),this._unbindEvents(),this.view.destroy()},e.moduleName="timeControl",e.View=o.default,e.dependencies=["engine","eventEmitter","theme"],e}();t.default=r},14501:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={timeText:{color:function(e){return e.color}}}},7562:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(92712),i=(0,o.__importDefault)(n(30313)),r=(0,o.__importDefault)(n(45264)),s=n(35574),a=(0,o.__importDefault)(n(61045)),l=(0,o.__importDefault)(n(46484)),u=(0,o.__importDefault)(n(14501)),c=(0,o.__importDefault)(n(48543)),d=function(e){function t(t){var n=this,o=t.theme;return(n=e.call(this,o)||this)._initDOM(),n}return(0,o.__extends)(t,e),t.prototype._initDOM=function(){this._$rootElement=(0,a.default)((0,s.timeTemplate)({styles:this.styleNames,themeStyles:this.themeStyles})),this._$currentTime=(0,l.default)(this._$rootElement,"current-time-indicator"),this._$durationTime=(0,l.default)(this._$rootElement,"duration-time-indicator")},t.prototype.setDurationTime=function(e){e!==this._duration&&(this._duration=e,this._updateDurationTime())},t.prototype.setCurrentTime=function(e){e!==this._current&&(this._current=e,this._updateCurrentTime())},t.prototype.setCurrentTimeBackward=function(e){this._isBackward=e,this._updateCurrentTime()},t.prototype._updateDurationTime=function(){this._$durationTime.innerHTML=(0,r.default)(this._duration),this._$rootElement.setAttribute("data-playable-duration",this._duration?this._duration.toString():"0")},t.prototype._updateCurrentTime=function(){this._isBackward?this._$currentTime.innerHTML=(0,r.default)(this._current-this._duration):this._$currentTime.innerHTML=(0,r.default)(this._current),this._$rootElement.setAttribute("data-playable-current-time",this._current?this._current.toString():"0")},t.prototype.showDuration=function(){this._$durationTime.classList.remove(this.styleNames.hidden)},t.prototype.hideDuration=function(){this._$durationTime.classList.add(this.styleNames.hidden)},t.prototype.show=function(){this._$rootElement.classList.remove(this.styleNames.hidden)},t.prototype.hide=function(){this._$rootElement.classList.add(this.styleNames.hidden)},t.prototype.getElement=function(){return this._$rootElement},t.prototype.destroy=function(){this._$rootElement.parentNode&&this._$rootElement.parentNode.removeChild(this._$rootElement),this._$currentTime=null,this._$durationTime=null,this._$rootElement=null},t}(i.default);d.setTheme(u.default),d.extendStyleNames(c.default),t.default=d},72771:function(e){e.exports={__esModule:!0,default:function(e){return'
'}}},71674:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.controlTemplate=void 0;var o=(0,n(92712).__importDefault)(n(72771)),i=o.default.default?o.default.default:o.default;t.controlTemplate=i},59490:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(92712),i=(0,o.__importDefault)(n(70869)),r=(0,o.__importStar)(n(43450)),s=n(66045),a=n(24590),l=function(){function e(e){var t=e.engine,n=e.eventEmitter,o=e.textMap,i=e.tooltipService,r=e.theme;this._engine=t,this._eventEmitter=n,this._textMap=o,this._tooltipService=i,this._theme=r,this._bindCallbacks(),this._initUI(),this._bindEvents(),this.view.setVolume(this._engine.getVolume()),this.view.setMute(this._engine.isMuted),this._initInterceptor()}return e.prototype.getElement=function(){return this.view.getElement()},e.prototype._initUI=function(){var t={callbacks:{onDragStart:this._broadcastDragStart,onDragEnd:this._broadcastDragEnd,onVolumeLevelChangeFromInput:this._getVolumeLevelFromInput,onVolumeLevelChangeFromWheel:this._getVolumeLevelFromWheel,onToggleMuteClick:this._toggleMuteState},theme:this._theme,textMap:this._textMap,tooltipService:this._tooltipService};this.view=new e.View(t)},e.prototype._initInterceptor=function(){var e,t,n=this;this._buttonInterceptor=new r.default(this.view.getButtonElement(),((e={})[r.KEYCODES.SPACE_BAR]=function(e){e.stopPropagation(),n._eventEmitter.emitAsync(a.UIEvent.KEYBOARD_KEYDOWN_INTERCEPTED),n._eventEmitter.emitAsync(n._engine.isMuted?a.UIEvent.UNMUTE_WITH_KEYBOARD:a.UIEvent.MUTE_WITH_KEYBOARD)},e[r.KEYCODES.ENTER]=function(e){e.stopPropagation(),n._eventEmitter.emitAsync(a.UIEvent.KEYBOARD_KEYDOWN_INTERCEPTED),n._eventEmitter.emitAsync(n._engine.isMuted?a.UIEvent.UNMUTE_WITH_KEYBOARD:a.UIEvent.MUTE_WITH_KEYBOARD)},e)),this._inputInterceptor=new r.default(this.view.getInputElement(),((t={})[r.KEYCODES.RIGHT_ARROW]=function(e){e.stopPropagation(),e.preventDefault(),n._eventEmitter.emitAsync(a.UIEvent.KEYBOARD_KEYDOWN_INTERCEPTED),n._eventEmitter.emitAsync(a.UIEvent.INCREASE_VOLUME_WITH_KEYBOARD),n._engine.setMute(!1),n._engine.increaseVolume(s.AMOUNT_TO_CHANGE_VOLUME)},t[r.KEYCODES.LEFT_ARROW]=function(e){e.stopPropagation(),e.preventDefault(),n._eventEmitter.emitAsync(a.UIEvent.KEYBOARD_KEYDOWN_INTERCEPTED),n._eventEmitter.emitAsync(a.UIEvent.DECREASE_VOLUME_WITH_KEYBOARD),n._engine.setMute(!1),n._engine.decreaseVolume(s.AMOUNT_TO_CHANGE_VOLUME)},t))},e.prototype._destroyInterceptor=function(){this._buttonInterceptor.destroy(),this._inputInterceptor.destroy()},e.prototype._bindEvents=function(){this._unbindEvents=this._eventEmitter.bindEvents([[a.VideoEvent.SOUND_STATE_CHANGED,this._updateSoundState]],this)},e.prototype._bindCallbacks=function(){this._getVolumeLevelFromInput=this._getVolumeLevelFromInput.bind(this),this._toggleMuteState=this._toggleMuteState.bind(this),this._getVolumeLevelFromWheel=this._getVolumeLevelFromWheel.bind(this),this._broadcastDragStart=this._broadcastDragStart.bind(this),this._broadcastDragEnd=this._broadcastDragEnd.bind(this)},e.prototype._broadcastDragStart=function(){this._eventEmitter.emitAsync(a.UIEvent.CONTROL_DRAG_START)},e.prototype._broadcastDragEnd=function(){this._eventEmitter.emitAsync(a.UIEvent.CONTROL_DRAG_END)},e.prototype._changeVolumeLevel=function(e){this._engine.setVolume(e),this._eventEmitter.emitAsync(a.UIEvent.VOLUME_CHANGE,e),this._engine.isMuted&&this._toggleMuteState()},e.prototype._toggleMuteState=function(){var e=!this._engine.isMuted;this._engine.setMute(e),this._eventEmitter.emitAsync(e?a.UIEvent.MUTE_CLICK:a.UIEvent.UNMUTE_CLICK)},e.prototype._getVolumeLevelFromWheel=function(e){if(!this._engine.isMuted){var t=this._engine.getVolume()+e/10,n=Math.min(100,Math.max(0,t));this._changeVolumeLevel(n)}},e.prototype._getVolumeLevelFromInput=function(e){this._changeVolumeLevel(e)},e.prototype._updateSoundState=function(){this._setVolumeLevel(this._engine.getVolume()),this._setMuteState(this._engine.isMuted)},e.prototype._setVolumeLevel=function(e){this.view.setVolume(e),this.view.setMute(Boolean(!e))},e.prototype._setMuteState=function(e){var t=this._engine.getVolume();this.view.setVolume(e?0:t),this.view.setMute(e||Boolean(!t))},e.prototype.hide=function(){this.isHidden=!0,this.view.hide()},e.prototype.show=function(){this.isHidden=!1,this.view.show()},e.prototype.destroy=function(){this._destroyInterceptor(),this._unbindEvents(),this.view.destroy()},e.moduleName="volumeControl",e.View=i.default,e.dependencies=["engine","eventEmitter","textMap","tooltipService","theme"],e}();t.default=l},39110:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(52892);t.default={volumeSvgFill:{fill:function(e){return e.color}},volumeSvgStroke:{stroke:function(e){return e.color}},volumeProgress:{backgroundColor:function(e){return e.color},"&:after":{backgroundColor:function(e){return e.color}}},volumeProgressBackground:{backgroundColor:function(e){return(0,o.transperentizeColor)(e.color,.25)}}}},70869:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(92712),i=n(24590),r=n(71674),s=(0,o.__importDefault)(n(30313)),a=(0,o.__importDefault)(n(61045)),l=(0,o.__importDefault)(n(46484)),u=(0,o.__importDefault)(n(39110)),c=(0,o.__importDefault)(n(83323)),d=function(e,t){var n=t.getBoundingClientRect(),o=e.clientX;return on.left+n.width?100:(e.clientX-n.left)/n.width*100},p=function(e){function t(t){var n=this,o=t.callbacks,i=t.textMap,r=t.tooltipService,s=t.theme;return(n=e.call(this,s)||this)._callbacks=o,n._textMap=i,n._tooltipService=r,n._bindCallbacks(),n._initDOM(),n._bindEvents(),n}return(0,o.__extends)(t,e),t.prototype._initDOM=function(){this._$rootElement=(0,a.default)((0,r.controlTemplate)({styles:this.styleNames,themeStyles:this.themeStyles,texts:{muteLabel:this._textMap.get(i.TextLabel.MUTE_CONTROL_LABEL),volumeLabel:this._textMap.get(i.TextLabel.VOLUME_CONTROL_LABEL)}})),this._$muteToggle=(0,l.default)(this._$rootElement,"mute-button"),this._$volumeContainer=(0,l.default)(this._$rootElement,"volume-input-block"),this._$hitbox=(0,l.default)(this._$rootElement,"volume-hitbox"),this._$volume=(0,l.default)(this._$rootElement,"volume-input"),this._muteToggleTooltipReference=this._tooltipService.createReference(this._$muteToggle,{text:this._textMap.get(i.TextLabel.MUTE_CONTROL_TOOLTIP)})},t.prototype._bindCallbacks=function(){this._onButtonClick=this._onButtonClick.bind(this),this._startDragOnMouseDown=this._startDragOnMouseDown.bind(this),this._stopDragOnMouseUp=this._stopDragOnMouseUp.bind(this),this._setVolumeByWheel=this._setVolumeByWheel.bind(this),this._setVolumeByClick=this._setVolumeByClick.bind(this),this._setVolumeByDrag=this._setVolumeByDrag.bind(this)},t.prototype._bindEvents=function(){this._$hitbox.addEventListener("wheel",this._setVolumeByWheel),this._$hitbox.addEventListener("mousedown",this._startDragOnMouseDown),window.addEventListener("mousemove",this._setVolumeByDrag),window.addEventListener("mouseup",this._stopDragOnMouseUp),this._$muteToggle.addEventListener("click",this._onButtonClick)},t.prototype._unbindEvents=function(){this._$hitbox.removeEventListener("wheel",this._setVolumeByWheel),this._$hitbox.removeEventListener("mousedown",this._startDragOnMouseDown),window.removeEventListener("mousemove",this._setVolumeByDrag),window.removeEventListener("mouseup",this._stopDragOnMouseUp),this._$muteToggle.removeEventListener("click",this._onButtonClick)},t.prototype._startDragOnMouseDown=function(e){e.button>1||(this._setVolumeByClick(e),this._startDrag())},t.prototype._stopDragOnMouseUp=function(e){e.button>1||this._stopDrag()},t.prototype._setVolumeByClick=function(e){this._$volumeContainer.focus();var t=d(e,this._$hitbox);this._callbacks.onVolumeLevelChangeFromInput(t)},t.prototype._setVolumeByDrag=function(e){var t=d(e,this._$hitbox);this._isDragging&&this._callbacks.onVolumeLevelChangeFromInput(t)},t.prototype._setVolumeByWheel=function(e){e.preventDefault();var t=e.deltaX||-1*e.deltaY;t&&this._callbacks.onVolumeLevelChangeFromWheel(t)},t.prototype._startDrag=function(){this._isDragging=!0,this._$rootElement.classList.add(this.styleNames.isDragging),this._callbacks.onDragStart()},t.prototype._stopDrag=function(){this._isDragging&&(this._isDragging=!1,this._$rootElement.classList.remove(this.styleNames.isDragging),this._callbacks.onDragEnd())},t.prototype._setVolumeDOMAttributes=function(e){this._$volumeContainer.setAttribute("value",String(e)),this._$volumeContainer.setAttribute("aria-valuetext",this._textMap.get(i.TextLabel.VOLUME_CONTROL_VALUE,{percent:e})),this._$volumeContainer.setAttribute("aria-valuenow",String(e)),this._$volume.setAttribute("style","width:".concat(e,"%;")),this._$rootElement.setAttribute("data-playable-volume-percent",String(e)),this._$muteToggle.classList.remove(this.styleNames.volume0),this._$muteToggle.classList.remove(this.styleNames.volume50),this._$muteToggle.classList.remove(this.styleNames.volume100),e>=50?this._$muteToggle.classList.add(this.styleNames.volume100):e>0?this._$muteToggle.classList.add(this.styleNames.volume50):this._$muteToggle.classList.add(this.styleNames.volume0)},t.prototype._onButtonClick=function(){this._$muteToggle.focus(),this._callbacks.onToggleMuteClick()},t.prototype.setVolume=function(e){this._setVolumeDOMAttributes(e)},t.prototype.setMute=function(e){this._setMuteDOMAttributes(e)},t.prototype._setMuteDOMAttributes=function(e){e?this._$muteToggle.classList.add(this.styleNames.muted):this._$muteToggle.classList.remove(this.styleNames.muted),this._$muteToggle.setAttribute("aria-label",e?this._textMap.get(i.TextLabel.UNMUTE_CONTROL_LABEL):this._textMap.get(i.TextLabel.MUTE_CONTROL_LABEL)),this._muteToggleTooltipReference.setText(e?this._textMap.get(i.TextLabel.UNMUTE_CONTROL_TOOLTIP):this._textMap.get(i.TextLabel.MUTE_CONTROL_TOOLTIP)),this._$rootElement.setAttribute("data-playable-is-muted",String(e))},t.prototype.show=function(){this._$rootElement.classList.remove(this.styleNames.hidden)},t.prototype.hide=function(){this._$rootElement.classList.add(this.styleNames.hidden)},t.prototype.getElement=function(){return this._$rootElement},t.prototype.getButtonElement=function(){return this._$muteToggle},t.prototype.getInputElement=function(){return this._$volumeContainer},t.prototype.destroy=function(){this._unbindEvents(),this._muteToggleTooltipReference.destroy(),this._$rootElement.parentNode&&this._$rootElement.parentNode.removeChild(this._$rootElement),this._$muteToggle=null,this._$rootElement=null},t}(s.default);p.setTheme(u.default),p.extendStyleNames(c.default),t.default=p},40009:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=(0,n(92712).__importDefault)(n(19768)),i=function(){function e(e,t){var n=(void 0===t?{}:t).prefix,o=void 0===n?"data-playable":n;this._element=e,this._queryPrefix=o,this._queries=[]}return e.prototype._getQueryAttributeValue=function(e,t){return this._queries.filter((function(n){return n.mode===e&&("max"===e&&n.width>=t||"min"===e&&n.width<=t)})).map((function(e){return"".concat(e.width,"px")})).join(" ")},e.prototype._setQueryAttribute=function(e,t){var n=this._queryPrefix?"".concat(this._queryPrefix,"-").concat(e,"-width"):"".concat(e,"-width"),o=this._getQueryAttributeValue(e,t);o?this._element.setAttribute(n,o):this._element.removeAttribute(n)},e.prototype.getQueries=function(){this._queries=(0,o.default)(this._element,this._queryPrefix)},e.prototype.setWidth=function(e){this._setQueryAttribute("min",e),this._setQueryAttribute("max",e)},e.prototype.destroy=function(){this._element=null},e}();t.default=i},19768:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(92712),i=n(46720),r=(0,o.__importDefault)(n(12301)),s=/,?[\s\t]*([^,\n]*?)((?:\[[\s\t]*?(?:[a-z-]+-)?(?:min|max)-width[\s\t]*?[~$\^]?=[\s\t]*?"[^"]*?"[\s\t]*?])+)([^,\n\s\{]*)/gim,a=/\[[\s\t]*?(?:([a-z-]+)-)?(min|max)-width[\s\t]*?[~$\^]?=[\s\t]*?"([^"]*?)"[\s\t]*?]/gim;function l(e){var t=[];return-1===e.indexOf("min-width")&&-1===e.indexOf("max-width")?[]:(e=e.replace(/'/g,'"'),(0,i.forEachMatch)(e,s,(function(e){var n=e.slice(1),o=n[0],r=n[1],s=o+n[2];(0,i.forEachMatch)(r,a,(function(e){var n=e.slice(1),o=n[0],i=void 0===o?"":o,r=n[1],a=n[2];t.push({selector:s,prefix:i,mode:r,width:parseInt(a,10)})}))})),t)}function u(){return(0,i.reduce)(document.styleSheets,(function(e,t){try{var n=t.cssRules||t.rules;if(n)return e.concat(function(e){return(0,i.reduce)(e,(function(e,t){if(1===t.type){var n=t.selectorText||t.cssText;return e.concat(l(n))}return e}),[])}(n));if(t.cssText)return e.concat(l(t.cssText))}catch(e){}return e}),[])}t.default=function(e,t){void 0===t&&(t="");var n=new Map,o=[];return u().forEach((function(i){n.has(i.selector)||n.set(i.selector,(0,r.default)(e,i.selector)),n.get(i.selector)&&(i.prefix!==t||o.some((function(e){return e.mode===i.mode&&e.width===i.width}))||o.push({mode:i.mode,width:i.width}))})),o.sort((function(e,t){return e.width-t.width}))}},96085:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(40009);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o(i).default}})},12301:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector"];if("undefined"!=typeof HTMLElement)for(var i=0;i1)throw new Error("HTML provided to htmlToElement doesn't have root element");return t.firstChild}},8866:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=(0,n(92712).__importDefault)(n(9383)),i=function(){function e(e){this._themeStyles={};var t=this.constructor._moduleTheme;e&&t&&(e.registerModuleTheme(this,t),this._themeStyles=e.get(this))}return e.setTheme=function(e){this._moduleTheme=e},e.extendStyleNames=function(e){this._styles=(0,o.default)(this._styles,e)},e.resetStyles=function(){this._styles={}},Object.defineProperty(e.prototype,"themeStyles",{get:function(){return this._themeStyles},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"styleNames",{get:function(){return this.constructor._styles||{}},enumerable:!1,configurable:!0}),e._styles={},e}();t.default=i},52892:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_THEME_CONFIG=t.transperentizeColor=void 0;var o=n(92712),i=(0,o.__importDefault)(n(50622));t.transperentizeColor=i.default;var r=(0,o.__importStar)(n(87411));Object.defineProperty(t,"DEFAULT_THEME_CONFIG",{enumerable:!0,get:function(){return r.DEFAULT_THEME_CONFIG}}),t.default=r.default},1725:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StyleSheet=void 0;var o=n(92712),i=(0,o.__importDefault)(n(20054)),r=(0,o.__importDefault)(n(7105)),s=function(){function e(){this._rulesByModule=new Map,this._classNamesByModule=new Map,this._data={}}return e.prototype.attach=function(){var e=this;this._styleNode=this._styleNode||document.createElement("style");var t=[];this._rulesByModule.forEach((function(n,o){t.push(e._getModuleCSS(o))})),this._styleNode.innerHTML=t.join(" "),document.getElementsByTagName("head")[0].appendChild(this._styleNode)},e.prototype.update=function(e){this._data=(0,o.__assign)((0,o.__assign)({},this._data),e),this._styleNode&&this.attach()},e.prototype.registerModuleTheme=function(e,t){if(this._rulesByModule.get(e))throw new Error("can`t register multiple themes for one module");this._rulesByModule.set(e,t),this._classNamesByModule.set(e,(0,r.default)(t))},e.prototype.getModuleClassNames=function(e){return this._classNamesByModule.get(e)},e.prototype._getModuleCSS=function(e){var t=this,n=this._rulesByModule.get(e),o=this._classNamesByModule.get(e);return n&&o?Object.keys(n).map((function(e){return t._getRuleCSS(n[e],o[e])})).join(" "):""},e.prototype._getRuleCSS=function(e,t){var n=this;if(!e||!t)return"";var o=Object.keys(e).filter((function(t){return"object"==typeof e[t]})).map((function(e){return-1!==e.indexOf("&")?e:"& ".concat(e)})).map((function(o){var i=o.replace(/&/g,".".concat(t));return"".concat(i," {").concat(n._getRuleStyles(e[o]),"}")})).join(" ");return".".concat(t," {").concat(this._getRuleStyles(e),"} ").concat(o)},e.prototype._getRuleStyles=function(e){var t=this;return Object.keys(e).filter((function(t){return"object"!=typeof e[t]})).map((function(n){return"".concat((0,i.default)(n),": ").concat("function"==typeof e[n]?e[n](t._data):e[n])})).join("; ")},e}();t.StyleSheet=s},87411:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_THEME_CONFIG=void 0;var o=n(92712),i=n(1725),r=(0,o.__importDefault)(n(17022)),s={color:"#FFF",liveColor:"#ea492e",progressColor:"#FFF"};t.DEFAULT_THEME_CONFIG=s;var a=function(){function e(e){var t=this,n=e.themeConfig;this._styleSheet=new i.StyleSheet,this._styleSheet.update((0,o.__assign)((0,o.__assign)({},s),n)),window.setTimeout((function(){t._styleSheet&&t._styleSheet.attach()}),0)}return e.prototype.updateTheme=function(e){this._styleSheet.update(e)},e.prototype.registerModuleTheme=function(e,t){this._styleSheet.registerModuleTheme(e,t)},e.prototype.get=function(e){return this._styleSheet.getModuleClassNames(e)},e.prototype.destroy=function(){this._styleSheet=null},e.moduleName="theme",e.dependencies=["themeConfig"],(0,o.__decorate)([(0,r.default)()],e.prototype,"updateTheme",null),e}();t.default=a},20054:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}},7105:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(92712),i=(0,o.__importDefault)(n(68238));t.default=function(e){return Object.keys(e).reduce((function(e,t){var n;return(0,o.__assign)((0,o.__assign)({},e),((n={})[t]=function(e){return"wix-playable--".concat((0,i.default)(e))}(t),n))}),{})}},68238:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=(0,n(92712).__importDefault)(n(20054)),i=new Map;t.default=function(e){var t=(0,o.default)(e);return"".concat(t).concat(function(e){if(i.has(e)){var t=i.get(e)+1;return i.set(e,t),"".concat(t)}return i.set(e,0),""}(t))}},93590:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,o=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i;t.default=function(e){var t=(e=e.replace(n,(function(e,t,n,o){return t+t+n+n+o+o}))).match(o);if(t)return{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)};throw new Error("Playable.js: Color passed to theme should be in HEX format")}},50622:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=(0,n(92712).__importDefault)(n(93590));t.default=function(e,t){void 0===t&&(t=1);var n=(0,o.default)(e),i=n.r,r=n.g,s=n.b;return"rgba(".concat(i,",").concat(r,",").concat(s,",").concat(t,")")}},23802:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){n?e.classList.add(t):e.classList.remove(t)}},33620:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getTooltipPositionByReferenceElement=t.TooltipService=t.Tooltip=void 0;var i=n(18632);Object.defineProperty(t,"Tooltip",{enumerable:!0,get:function(){return o(i).default}});var r=n(7179);Object.defineProperty(t,"TooltipService",{enumerable:!0,get:function(){return o(r).default}});var s=n(85600);Object.defineProperty(t,"getTooltipPositionByReferenceElement",{enumerable:!0,get:function(){return o(s).default}})},41548:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tooltipContainerTemplate=t.tooltipTemplate=void 0;var o=n(92712),i=(0,o.__importDefault)(n(414)),r=(0,o.__importDefault)(n(22403)),s=i.default.default?i.default.default:i.default;t.tooltipTemplate=s;var a=r.default.default?r.default.default:r.default;t.tooltipContainerTemplate=a},414:function(e){e.exports={__esModule:!0,default:function(e){return''}}},22403:function(e){e.exports={__esModule:!0,default:function(e){return'
'}}},94307:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(92712),i=n(41548),r=(0,o.__importDefault)(n(61045)),s=(0,o.__importDefault)(n(8866)),a=n(77856),l=(0,o.__importDefault)(n(54626)),u=function(e){function t(t){var n=e.call(this)||this;return n._tooltip=t,n._initDOM(),n}return(0,o.__extends)(t,e),t.prototype.getElement=function(){return this._$rootElement},t.prototype._initDOM=function(){this._$rootElement=(0,r.default)((0,i.tooltipContainerTemplate)({styles:this.styleNames})),this._$rootElement.appendChild(this._tooltip.getElement())},t.prototype.getTooltipPositionStyles=function(e){return"function"==typeof e&&(e=e(this._$rootElement)),e.placement===a.TooltipPositionPlacement.TOP?{left:"".concat(this._getTooltipLeftX(e.x),"px"),top:0,bottom:"initial"}:{left:"".concat(this._getTooltipLeftX(e.x),"px"),top:"initial",bottom:0}},t.prototype.destroy=function(){this._tooltip=null,this._$rootElement=null},t.prototype._getTooltipLeftX=function(e){var t=this._tooltip.getElement().getBoundingClientRect(),n=this._$rootElement.getBoundingClientRect(),o=e-t.width/2;return o=Math.max(o,0),o=Math.min(o,n.width-t.width)},t}(s.default);u.extendStyleNames(l.default),t.default=u},21271:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=(0,n(92712).__importDefault)(n(85600)),i=["mouseenter","focus"],r=["mouseleave","blur"],s=function(){function e(e,t,n){this._$reference=e,this._options=n,this._tooltipService=t,this._eventListeners=[],this._bindEvents()}return e.prototype._bindEvents=function(){var e=this;i.forEach((function(t){var n=function(){e.show()};e._eventListeners.push({event:t,fn:n}),e._$reference.addEventListener(t,n)})),r.forEach((function(t){var n=function(){e.hide()};e._eventListeners.push({event:t,fn:n}),e._$reference.addEventListener(t,n)}))},Object.defineProperty(e.prototype,"isHidden",{get:function(){return this._tooltipService.isHidden},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isDisabled",{get:function(){return this._isDisabled},enumerable:!1,configurable:!0}),e.prototype.show=function(){this._isDisabled||this._tooltipService.show({text:this._options.text,element:this._options.element,position:(0,o.default)(this._$reference,this._tooltipService.tooltipContainerElement)})},e.prototype.hide=function(){this._tooltipService.hide()},e.prototype.setText=function(e){this._options.text=e,this._tooltipService.setText(e)},e.prototype.disable=function(){this._isDisabled=!0},e.prototype.enable=function(){this._isDisabled=!1},e.prototype.destroy=function(){var e=this;this._eventListeners.forEach((function(t){var n=t.event,o=t.fn;e._$reference.removeEventListener(n,o)})),this._eventListeners=null,this._$reference=null,this._tooltipService=null,this._options=null},e}();t.default=s},7179:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(92712),i=(0,o.__importDefault)(n(21271)),r=(0,o.__importDefault)(n(94307)),s=(0,o.__importDefault)(n(18632)),a=n(24590),l=function(){function e(e){var t=e.eventEmitter;this._eventEmitter=t,this._tooltip=new s.default,this._tooltipContainer=new r.default(this._tooltip),this._bindEvents()}return Object.defineProperty(e.prototype,"isHidden",{get:function(){return this._tooltip.isHidden},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tooltipContainerElement",{get:function(){return this._tooltipContainer.getElement()},enumerable:!1,configurable:!0}),e.prototype._bindEvents=function(){this._unbindEvents=this._eventEmitter.bindEvents([[a.UIEvent.FULL_SCREEN_STATE_CHANGED,this.hide]],this)},e.prototype.setText=function(e){this._tooltip.setText(e)},e.prototype.show=function(e){e.element?this._tooltip.setElement(e.element):this._tooltip.setText(e.text),this._tooltip.setStyle(this._tooltipContainer.getTooltipPositionStyles(e.position)),this._tooltip.show()},e.prototype.clearElement=function(){this._tooltip.clearElement()},e.prototype.hide=function(){this._tooltip.hide()},e.prototype.createReference=function(e,t){return new i.default(e,this,t)},e.prototype.destroy=function(){this._unbindEvents(),this._tooltip.destroy(),this._tooltipContainer.destroy(),this._tooltip=null,this._tooltipContainer=null,this._eventEmitter=null},e.moduleName="tooltipService",e.dependencies=["eventEmitter"],e}();t.default=l},18632:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(92712),i=n(41548),r=(0,o.__importDefault)(n(61045)),s=(0,o.__importDefault)(n(46484)),a=(0,o.__importDefault)(n(8866)),l=(0,o.__importDefault)(n(89329)),u=function(e){function t(){var t=e.call(this)||this;return t._isHidden=!0,t._initDOM(),t}return(0,o.__extends)(t,e),t.prototype._initDOM=function(){this._$rootElement=(0,r.default)((0,i.tooltipTemplate)({styles:this.styleNames})),this._$tooltipInner=(0,s.default)(this._$rootElement,"tooltip-inner")},t.prototype.getElement=function(){return this._$rootElement},Object.defineProperty(t.prototype,"isHidden",{get:function(){return this._isHidden},enumerable:!1,configurable:!0}),t.prototype.show=function(){this._isHidden&&(this._isHidden=!1,this._$rootElement.classList.add(this.styleNames.tooltipVisible))},t.prototype.hide=function(){this._isHidden||(this._isHidden=!0,this._$rootElement.classList.remove(this.styleNames.tooltipVisible))},t.prototype.setText=function(e){this.clearElement(),this._showAsText(),this._$tooltipInner.innerText=e},t.prototype.clearElement=function(){this._$tooltipInner.firstChild&&this._$tooltipInner.removeChild(this._$tooltipInner.firstChild)},t.prototype.setElement=function(e){e!==this._$tooltipInner.firstChild&&(this._showAsElement(),this.clearElement(),e&&this._$tooltipInner.appendChild(e))},t.prototype._showAsText=function(){this._$rootElement.classList.remove(this.styleNames.showAsElement),this._$rootElement.classList.add(this.styleNames.showAsText)},t.prototype._showAsElement=function(){this._$rootElement.classList.remove(this.styleNames.showAsText),this._$rootElement.classList.add(this.styleNames.showAsElement)},t.prototype.setStyle=function(e){var t=this;Object.keys(e).forEach((function(n){t._$rootElement.style[n]=e[n]}))},t.prototype.destroy=function(){this._$rootElement=null,this._$tooltipInner=null},t}(a.default);u.extendStyleNames(l.default),t.default=u},77856:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.TooltipPositionPlacement=void 0,function(e){e.TOP="top",e.BOTTOM="bottom"}(n||(n={})),t.TooltipPositionPlacement=n},85600:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(77856);function i(e,t){return e+t/2}t.default=function(e,t,n){void 0===n&&(n=i);var r=e.getBoundingClientRect(),s=t.getBoundingClientRect();return{placement:r.top>s.top?o.TooltipPositionPlacement.BOTTOM:o.TooltipPositionPlacement.TOP,x:n(r.left-s.left,r.width)}}},45264:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=!isNaN(e)&&isFinite(e),n=t&&e<0,o=new Date(null);o.setSeconds(t?Math.abs(Math.floor(e)):0);var i=o.toISOString().substr(11,8).replace(/^00:/,"");return n?"-".concat(i):i}},30313:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(92712),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,o.__extends)(t,e),t}((0,o.__importDefault)(n(8866)).default);t.default=i},88858:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(92712),i=n(24590),r=(0,o.__importDefault)(n(58263)),s=n(43450),a=function(){function e(e){var t=e.engine,n=e.rootContainer,o=e.keyboardControl;this._engine=t,this._bindCallbacks(),this._initUI(),this.hide(),n.appendComponentElement(this.getElement()),o.addKeyControl(s.KEYCODES.DEBUG_KEY,this._keyControlCallback)}return e.prototype._keyControlCallback=function(e){e.ctrlKey&&e.shiftKey&&this.show()},e.prototype.getElement=function(){return this.view.getElement()},e.prototype._initUI=function(){this.view=new r.default({callbacks:{onCloseButtonClick:this.hide}})},e.prototype._bindCallbacks=function(){this.updateInfo=this.updateInfo.bind(this),this.hide=this.hide.bind(this),this._keyControlCallback=this._keyControlCallback.bind(this)},e.prototype.getDebugInfo=function(){var e=this._engine.getDebugInfo();if("html5video"===e.output){var t=e,n=t.url,o=t.type,r=t.deliveryPriority,s=t.currentBitrate,a=t.overallBufferLength,l=t.nearestBufferSegInfo,u=t.viewDimensions,c=t.currentTime,d=t.duration,p=t.loadingStateTimestamps,h=t.bitrates,_=t.bwEstimate,f=t.output;return{url:n,type:o,deliveryPriority:i.MediaStreamDeliveryPriority[r],currentBitrate:s,overallBufferLength:a,nearestBufferSegInfo:l,viewDimensions:u,currentTime:c,duration:d,loadingStateTimestamps:p,bitrates:h,bwEstimate:_,output:f}}return e},e.prototype.updateInfo=function(){this.view.setInfo(this.getDebugInfo())},e.prototype.setUpdateInterval=function(){this.clearUpdateInterval(),this._interval=window.setInterval(this.updateInfo,1e3)},e.prototype.clearUpdateInterval=function(){window.clearInterval(this._interval)},e.prototype.show=function(){this.isHidden&&(this.updateInfo(),this.setUpdateInterval(),this.view.show(),this.isHidden=!1)},e.prototype.hide=function(){this.isHidden||(this.clearUpdateInterval(),this.view.hide(),this.isHidden=!0)},e.prototype.destroy=function(){this.clearUpdateInterval(),this.view.destroy()},e.moduleName="debugPanel",e.View=r.default,e.dependencies=["engine","rootContainer","keyboardControl"],e}();t.default=a},58263:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(92712),i=(0,o.__importDefault)(n(30313)),r=n(20785),s=(0,o.__importDefault)(n(25979)),a=(0,o.__importDefault)(n(61045)),l=(0,o.__importDefault)(n(46484)),u=(0,o.__importDefault)(n(23802)),c=(0,o.__importDefault)(n(83909)),d=function(e){function t(t){var n=e.call(this)||this,o=t.callbacks;return n._callbacks=o,n._initDOM(),n._bindEvents(),n}return(0,o.__extends)(t,e),t.prototype._initDOM=function(){this._$rootElement=(0,a.default)((0,r.debugPanelTemplate)({styles:this.styleNames})),this._$closeButton=(0,l.default)(this._$rootElement,"debug-panel-close-button"),this._$infoContainer=(0,l.default)(this._$rootElement,"debug-panel-info-container")},t.prototype._bindEvents=function(){this._$closeButton.addEventListener("click",this._callbacks.onCloseButtonClick)},t.prototype._unbindEvents=function(){this._$closeButton.removeEventListener("click",this._callbacks.onCloseButtonClick)},t.prototype.show=function(){(0,u.default)(this._$rootElement,this.styleNames.hidden,!1)},t.prototype.hide=function(){(0,u.default)(this._$rootElement,this.styleNames.hidden,!0)},t.prototype.setInfo=function(e){this._$infoContainer.innerHTML=(0,s.default)(JSON.stringify(e,void 0,4),this.styleNames)},t.prototype.getElement=function(){return this._$rootElement},t.prototype.destroy=function(){this._unbindEvents(),this._$rootElement.parentNode&&this._$rootElement.parentNode.removeChild(this._$rootElement),this._$rootElement=null,this._$closeButton=null,this._$infoContainer=null},t}(i.default);d.extendStyleNames(c.default),t.default=d},25979:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(e=e.replace(/&/g,"&").replace(//g,">")).replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+-]?\d+)?)/g,(function(e){var n=t.number;return/^"/.test(e)?n=/:$/.test(e)?t.key:t.string:/true|false/.test(e)?n=t.boolean:/null/.test(e)&&(n=t.null),'').concat(e,"")}))}},23691:function(e){e.exports={__esModule:!0,default:function(e){return'
x
 
'}}},20785:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debugPanelTemplate=void 0;var o=(0,n(92712).__importDefault)(n(23691)),i=o.default.default?o.default.default:o.default;t.debugPanelTemplate=i},90859:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(92712),i=n(24590),r=(0,o.__importDefault)(n(86915)),s=function(){function e(e){var t=e.eventEmitter,n=e.engine,o=e.config,i=e.rootContainer;this._eventEmitter=t,this._engine=n,this._initUI(),this._bindEvents(),i.appendComponentElement(this.getElement()),o.hideMainUI&&this.hide()}return e.prototype.getElement=function(){return this.view.getElement()},e.prototype._initUI=function(){this.view=new r.default},e.prototype._bindEvents=function(){this._unbindEvents=this._eventEmitter.bindEvents([[i.UIEvent.TOGGLE_PLAYBACK_WITH_KEYBOARD,this._showPlaybackChangeIndicator],[i.UIEvent.GO_BACKWARD_WITH_KEYBOARD,this.showRewind],[i.UIEvent.GO_FORWARD_WITH_KEYBOARD,this.showForward],[i.UIEvent.INCREASE_VOLUME_WITH_KEYBOARD,this.showIncreaseVolume],[i.UIEvent.DECREASE_VOLUME_WITH_KEYBOARD,this.showDecreaseVolume],[i.UIEvent.MUTE_WITH_KEYBOARD,this.showMute],[i.UIEvent.UNMUTE_WITH_KEYBOARD,this.showIncreaseVolume]],this)},e.prototype.showPause=function(){this.view.activatePauseIcon()},e.prototype.showPlay=function(){this.view.activatePlayIcon()},e.prototype.showRewind=function(){this.view.activateRewindIcon()},e.prototype.showForward=function(){this.view.activateForwardIcon()},e.prototype.showMute=function(){this.view.activateMuteVolumeIcon()},e.prototype.showIncreaseVolume=function(){this.view.activateIncreaseVolumeIcon()},e.prototype.showDecreaseVolume=function(){this.view.activateDecreaseVolumeIcon()},e.prototype.hideIcons=function(){this.view.deactivateIcon(),this._eventEmitter.emitAsync(i.UIEvent.HIDE_INTERACTION_INDICATOR)},e.prototype.show=function(){this.view.show()},e.prototype.hide=function(){this.view.hide()},e.prototype._showPlaybackChangeIndicator=function(){var e=this._engine.getCurrentState();e===i.EngineState.PLAY_REQUESTED||e===i.EngineState.PLAYING?this.view.activatePauseIcon():this.view.activatePlayIcon()},e.prototype.destroy=function(){this._unbindEvents(),this.view.destroy()},e.moduleName="interactionIndicator",e.View=r.default,e.dependencies=["engine","eventEmitter","config","rootContainer"],e}();t.default=s},86915:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(92712),i=(0,o.__importDefault)(n(30313)),r=n(48324),s=(0,o.__importDefault)(n(61045)),a=(0,o.__importDefault)(n(87311)),l=function(e){function t(){var t=e.call(this)||this;return t._$rootElement=(0,s.default)((0,r.containerTemplate)({styles:t.styleNames})),t._playIcon=(0,r.playIconTemplate)({styles:t.styleNames}),t._pauseIcon=(0,r.pauseIconTemplate)({styles:t.styleNames}),t._forwardIcon=(0,r.forwardIconTemplate)({texts:{SECONDS_COUNT:5},styles:t.styleNames}),t._rewindIcon=(0,r.rewindIconTemplate)({texts:{SECONDS_COUNT:5},styles:t.styleNames}),t._increaseVolumeIcon=(0,r.increaseVolumeIconTemplate)({styles:t.styleNames}),t._decreaseVolumeIcon=(0,r.decreaseVolumeIconTemplate)({styles:t.styleNames}),t._muteIcon=(0,r.muteIconTemplate)({styles:t.styleNames}),t}return(0,o.__extends)(t,e),t.prototype.activatePlayIcon=function(){this._$rootElement.innerHTML=this._playIcon},t.prototype.activatePauseIcon=function(){this._$rootElement.innerHTML=this._pauseIcon},t.prototype.activateForwardIcon=function(){this._$rootElement.innerHTML=this._forwardIcon},t.prototype.activateRewindIcon=function(){this._$rootElement.innerHTML=this._rewindIcon},t.prototype.activateIncreaseVolumeIcon=function(){this._$rootElement.innerHTML=this._increaseVolumeIcon},t.prototype.activateDecreaseVolumeIcon=function(){this._$rootElement.innerHTML=this._decreaseVolumeIcon},t.prototype.activateMuteVolumeIcon=function(){this._$rootElement.innerHTML=this._muteIcon},t.prototype.deactivateIcon=function(){this._$rootElement.innerHTML=""},t.prototype.hide=function(){this._$rootElement.classList.add(this.styleNames.hidden)},t.prototype.show=function(){this._$rootElement.classList.remove(this.styleNames.hidden)},t.prototype.getElement=function(){return this._$rootElement},t.prototype.destroy=function(){this._$rootElement.parentNode&&this._$rootElement.parentNode.removeChild(this._$rootElement),this._$rootElement=null},t}(i.default);l.extendStyleNames(a.default),t.default=l},13471:function(e){e.exports={__esModule:!0,default:function(e){return'
'}}},68353:function(e){e.exports={__esModule:!0,default:function(e){return'
'}}},26493:function(e){e.exports={__esModule:!0,default:function(e){return'
'+e.texts.SECONDS_COUNT+'
'}}},79668:function(e){e.exports={__esModule:!0,default:function(e){return'
'}}},48324:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.muteIconTemplate=t.decreaseVolumeIconTemplate=t.increaseVolumeIconTemplate=t.rewindIconTemplate=t.forwardIconTemplate=t.playIconTemplate=t.pauseIconTemplate=t.containerTemplate=void 0;var o=n(92712),i=(0,o.__importDefault)(n(13471)),r=(0,o.__importDefault)(n(56192)),s=(0,o.__importDefault)(n(35761)),a=(0,o.__importDefault)(n(26493)),l=(0,o.__importDefault)(n(29973)),u=(0,o.__importDefault)(n(79668)),c=(0,o.__importDefault)(n(68353)),d=(0,o.__importDefault)(n(16549)),p=i.default.default?i.default.default:i.default;t.containerTemplate=p;var h=r.default.default?r.default.default:r.default;t.playIconTemplate=h;var _=s.default.default?s.default.default:s.default;t.pauseIconTemplate=_;var f=a.default.default?a.default.default:a.default;t.forwardIconTemplate=f;var v=l.default.default?l.default.default:l.default;t.rewindIconTemplate=v;var m=u.default.default?u.default.default:u.default;t.increaseVolumeIconTemplate=m;var y=c.default.default?c.default.default:c.default;t.decreaseVolumeIconTemplate=y;var E=d.default.default?d.default.default:d.default;t.muteIconTemplate=E},16549:function(e){e.exports={__esModule:!0,default:function(e){return'
'}}},35761:function(e){e.exports={__esModule:!0,default:function(e){return'
'}}},56192:function(e){e.exports={__esModule:!0,default:function(e){return'
'}}},29973:function(e){e.exports={__esModule:!0,default:function(e){return'
'+e.texts.SECONDS_COUNT+'
'}}},90568:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(92712),i=n(24590),r=(0,o.__importStar)(n(43450)),s=(0,o.__importDefault)(n(81130)),a=function(){function e(e){var t=e.engine,n=e.eventEmitter,o=e.textMap,i=e.tooltipService;this._isHidden=!0,this._isActive=!1,this._isEnded=!1,this._engine=t,this._eventEmitter=n,this._textMap=o,this._tooltipService=i,this._bindCallbacks(),this._initUI(),this._bindEvents(),this._initInterceptor()}return e.prototype.getElement=function(){return this.view.getElement()},e.prototype._initInterceptor=function(){var e,t=this;this._interceptor=new r.default(this.getElement(),((e={})[r.KEYCODES.SPACE_BAR]=function(e){e.stopPropagation(),t._eventEmitter.emitAsync(i.UIEvent.KEYBOARD_KEYDOWN_INTERCEPTED),t._syncWithLive()},e[r.KEYCODES.ENTER]=function(e){e.stopPropagation(),t._eventEmitter.emitAsync(i.UIEvent.KEYBOARD_KEYDOWN_INTERCEPTED),t._syncWithLive()},e))},Object.defineProperty(e.prototype,"isHidden",{get:function(){return this._isHidden},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isActive",{get:function(){return this._isActive},enumerable:!1,configurable:!0}),e.prototype.show=function(){this._toggle(!0)},e.prototype.hide=function(){this._toggle(!1)},e.prototype._initUI=function(){this.view=new e.View({callbacks:{onClick:this._syncWithLive},textMap:this._textMap,tooltipService:this._tooltipService})},e.prototype._bindCallbacks=function(){this._syncWithLive=this._syncWithLive.bind(this)},e.prototype._bindEvents=function(){var e=this;this._unbindEvents=this._eventEmitter.bindEvents([[i.VideoEvent.LIVE_STATE_CHANGED,this._processStateChange],[i.UIEvent.PROGRESS_SYNC_BUTTON_MOUSE_ENTER,function(){e.view.toggleActive(!0)}],[i.UIEvent.PROGRESS_SYNC_BUTTON_MOUSE_LEAVE,function(){e.view.toggleActive(e._isActive)}]],this)},e.prototype._processStateChange=function(e){switch(e.nextState){case i.LiveState.NONE:this._toggle(!1),this._toggleActive(!1),this._toggleEnded(!1);break;case i.LiveState.INITIAL:this._toggle(!0);break;case i.LiveState.SYNC:this._toggleActive(!0);break;case i.LiveState.NOT_SYNC:this._toggleActive(!1);break;case i.LiveState.ENDED:this._toggleActive(!1),this._toggleEnded(!0)}},e.prototype._syncWithLive=function(){this._isEnded||this._engine.syncWithLive()},e.prototype._toggle=function(e){this._isHidden=!e,this.view.toggle(e)},e.prototype._toggleActive=function(e){this._isActive=e,this.view.toggleActive(e)},e.prototype._toggleEnded=function(e){this._isEnded=e,this.view.toggleEnded(e)},e.prototype.destroy=function(){this._unbindEvents(),this._interceptor.destroy(),this.view.destroy()},e.moduleName="liveIndicator",e.View=s.default,e.dependencies=["engine","eventEmitter","textMap","tooltipService"],e}();t.default=a},81130:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(92712),i=(0,o.__importDefault)(n(30313)),r=n(73459),s=(0,o.__importDefault)(n(61045)),a=(0,o.__importDefault)(n(46484)),l=(0,o.__importDefault)(n(23802)),u=(0,o.__importDefault)(n(53867)),c=n(24590),d=function(e){function t(t){var n=e.call(this)||this;return n._callbacks=t.callbacks,n._textMap=t.textMap,n._tooltipService=t.tooltipService,n._initDOM(),n._bindEvents(),n}return(0,o.__extends)(t,e),t.prototype._initDOM=function(){this._$rootElement=(0,s.default)((0,r.liveIndicatorTemplate)({styles:this.styleNames,themeStyles:this.themeStyles,texts:{}})),this._$button=(0,a.default)(this._$rootElement,"live-indicator-button"),this._tooltipReference=this._tooltipService.createReference(this._$button,{text:this._textMap.get(c.TextLabel.LIVE_SYNC_TOOLTIP)}),this.toggle(!1),this.toggleActive(!1),this.toggleEnded(!1)},t.prototype._bindEvents=function(){this._$rootElement.addEventListener("click",this._callbacks.onClick)},t.prototype._unbindEvents=function(){this._$rootElement.removeEventListener("click",this._callbacks.onClick)},t.prototype.toggleActive=function(e){(0,l.default)(this._$rootElement,this.styleNames.active,e),(0,l.default)(this._$button,this.styleNames.clickable,!e),e?(this._$button.setAttribute("disabled","true"),this._tooltipReference.disable()):(this._$button.removeAttribute("disabled"),this._tooltipReference.enable())},t.prototype.toggleEnded=function(e){(0,l.default)(this._$rootElement,this.styleNames.ended,e),this._$button.innerText=this._textMap.get(c.TextLabel.LIVE_INDICATOR_TEXT,{isEnded:e}),this._$button.setAttribute("aria-label",e?"":this._textMap.get(c.TextLabel.LIVE_SYNC_LABEL)),this._$button.setAttribute("disabled","true"),e?this._tooltipReference.disable():this._tooltipReference.enable()},t.prototype.show=function(){this.toggle(!0)},t.prototype.hide=function(){this.toggle(!1)},t.prototype.toggle=function(e){(0,l.default)(this._$rootElement,this.styleNames.hidden,!e)},t.prototype.getElement=function(){return this._$rootElement},t.prototype.destroy=function(){this._unbindEvents(),this._tooltipReference.destroy(),this._$rootElement.parentNode&&this._$rootElement.parentNode.removeChild(this._$rootElement),this._$rootElement=null,this._$button=null},t}(i.default);d.extendStyleNames(u.default),t.default=d},73459:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.liveIndicatorTemplate=void 0;var o=(0,n(92712).__importDefault)(n(17039)),i=o.default.default?o.default.default:o.default;t.liveIndicatorTemplate=i},17039:function(e){e.exports={__esModule:!0,default:function(e){return'
"}}},2952:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DELAYED_SHOW_TIMEOUT=void 0;var o=n(92712),i=n(24590),r=(0,o.__importDefault)(n(6347));t.DELAYED_SHOW_TIMEOUT=100;var s=function(){function e(e){var t=e.config,n=e.eventEmitter,o=e.engine,i=e.rootContainer;this._eventEmitter=n,this.isHidden=!1,this._engine=o,this._bindCallbacks(),this._initUI(),this._bindEvents(),this._hideContent(),i.appendComponentElement(this.getElement()),t.hideMainUI&&this.hide()}return e.prototype.getElement=function(){return this.view.getElement()},e.prototype._bindCallbacks=function(){this._showContent=this._showContent.bind(this),this._hideContent=this._hideContent.bind(this)},e.prototype._bindEvents=function(){this._unbindEvents=this._eventEmitter.bindEvents([[i.VideoEvent.STATE_CHANGED,this._checkForWaitingState],[i.VideoEvent.UPLOAD_SUSPEND,this.hide]],this)},e.prototype._checkForWaitingState=function(e){switch(e.nextState){case i.EngineState.SEEK_IN_PROGRESS:case i.EngineState.WAITING:this.startDelayedShow();break;case i.EngineState.LOAD_STARTED:this._engine.isPreloadActive&&this._showContent();break;case i.EngineState.READY_TO_PLAY:case i.EngineState.PLAYING:case i.EngineState.PAUSED:this.stopDelayedShow(),this._hideContent()}},e.prototype._initUI=function(){this.view=new e.View},e.prototype._showContent=function(){this.isHidden&&(this._eventEmitter.emitAsync(i.UIEvent.LOADER_SHOW),this.view.showContent(),this.isHidden=!1)},e.prototype._hideContent=function(){this.isHidden||(this._eventEmitter.emitAsync(i.UIEvent.LOADER_HIDE),this.view.hideContent(),this.isHidden=!0)},e.prototype.hide=function(){this.view.hide()},e.prototype.show=function(){this.view.show()},e.prototype.startDelayedShow=function(){this.isDelayedShowScheduled&&this.stopDelayedShow(),this._delayedShowTimeout=window.setTimeout(this._showContent,t.DELAYED_SHOW_TIMEOUT)},e.prototype.stopDelayedShow=function(){window.clearTimeout(this._delayedShowTimeout),this._delayedShowTimeout=null},Object.defineProperty(e.prototype,"isDelayedShowScheduled",{get:function(){return Boolean(this._delayedShowTimeout)},enumerable:!1,configurable:!0}),e.prototype.destroy=function(){this._unbindEvents(),this.stopDelayedShow(),this.view.destroy()},e.moduleName="loader",e.View=r.default,e.dependencies=["engine","eventEmitter","config","rootContainer"],e}();t.default=s},6347:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(92712),i=(0,o.__importDefault)(n(30313)),r=n(79826),s=(0,o.__importDefault)(n(61045)),a=(0,o.__importDefault)(n(24198)),l=function(e){function t(){var t=e.call(this)||this;return t._$rootElement=(0,s.default)((0,r.loaderTemplate)({styles:t.styleNames})),t}return(0,o.__extends)(t,e),t.prototype.getElement=function(){return this._$rootElement},t.prototype.showContent=function(){this._$rootElement.classList.add(this.styleNames.active)},t.prototype.hideContent=function(){this._$rootElement.classList.remove(this.styleNames.active)},t.prototype.hide=function(){this._$rootElement.classList.add(this.styleNames.hidden)},t.prototype.show=function(){this._$rootElement.classList.remove(this.styleNames.hidden)},t.prototype.destroy=function(){this._$rootElement.parentNode&&this._$rootElement.parentNode.removeChild(this._$rootElement),this._$rootElement=null},t}(i.default);l.extendStyleNames(a.default),t.default=l},79826:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.loaderTemplate=void 0;var o=(0,n(92712).__importDefault)(n(19500)),i=o.default.default?o.default.default:o.default;t.loaderTemplate=i},19500:function(e){e.exports={__esModule:!0,default:function(e){return'
'}}},30533:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(92712),i=n(24590),r=(0,o.__importDefault)(n(17022)),s=(0,o.__importDefault)(n(24688)),a=function(){function e(e){this._hideTimeout=null,this._isContentShowingEnabled=!0,this._isContentShown=!1,this._shouldShowContent=!0,this._shouldAlwaysShow=!1,this._isDragging=!1;var t=e.config,n=e.eventEmitter,o=e.rootContainer,i=e.tooltipService,r=e.topBlock,s=e.bottomBlock,a=e.screen;this._config=t,this._eventEmitter=n,this._topBlock=r,this._bottomBlock=s,this._screen=a,this._tooltipService=i,this.isHidden=!1,this._shouldAlwaysShow=!1,this._initUI({tooltipContainer:i.tooltipContainerElement,topBlock:r.getElement(),bottomBlock:s.getElement()}),this._bindViewCallbacks(),this._bindEvents(),o.appendComponentElement(this.view.getElement()),t.hideMainUI&&this.hide()}return e.prototype.getElement=function(){return this.view.getElement()},e.prototype._initUI=function(t){this.view=new e.View({elements:t})},e.prototype._bindViewCallbacks=function(){this._startHideBlockTimeout=this._startHideBlockTimeout.bind(this),this._tryShowContent=this._tryShowContent.bind(this),this._tryHideContent=this._tryHideContent.bind(this)},e.prototype._bindEvents=function(){this._unbindEvents=this._eventEmitter.bindEvents([[i.UIEvent.MOUSE_MOVE_ON_PLAYER,this._startHideBlockTimeout],[i.UIEvent.MOUSE_LEAVE_ON_PLAYER,this._tryHideContent],[i.UIEvent.FOCUS_ENTER_ON_PLAYER,this._startHideBlockTimeout],[i.UIEvent.KEYBOARD_KEYDOWN_INTERCEPTED,this._startHideBlockTimeout],[i.UIEvent.LOADER_HIDE,this._startHideBlockTimeout],[i.VideoEvent.STATE_CHANGED,this._updatePlayingState],[i.UIEvent.CONTROL_DRAG_START,this._onControlDragStart],[i.UIEvent.CONTROL_DRAG_END,this._onControlDragEnd]],this)},e.prototype._updatePlayingState=function(e){switch(e.nextState){case i.EngineState.PLAY_REQUESTED:this._shouldShowContent=!1,this._startHideBlockTimeout();break;case i.EngineState.ENDED:case i.EngineState.PAUSED:case i.EngineState.SRC_SET:this._shouldShowContent=!0,this._tryShowContent()}},Object.defineProperty(e.prototype,"_isBlockFocused",{get:function(){return this._bottomBlock.isFocused||this._topBlock.isFocused},enumerable:!1,configurable:!0}),e.prototype._startHideBlockTimeout=function(){this._stopHideBlockTimeout(),this._tryShowContent(),this._hideTimeout=window.setTimeout(this._tryHideContent,2e3)},e.prototype._stopHideBlockTimeout=function(){this._hideTimeout&&window.clearTimeout(this._hideTimeout)},e.prototype._tryShowContent=function(){this._isContentShowingEnabled&&this._showContent()},e.prototype._onControlDragStart=function(){this._isDragging=!0},e.prototype._onControlDragEnd=function(){this._isDragging=!1,this._tryHideContent()},e.prototype._showContent=function(){this._screen.showCursor(),this.isHidden||this._isContentShown||(this._eventEmitter.emitAsync(i.UIEvent.MAIN_BLOCK_SHOW),this._bottomBlock.showContent(),this._topBlock.showContent(),this._isContentShown=!0)},e.prototype._tryHideContent=function(){this._isBlockFocused||this._isDragging||this._shouldShowContent||this._shouldAlwaysShow||this._hideContent()},e.prototype._hideContent=function(){this._isContentShowingEnabled&&this._screen.hideCursor(),!this.isHidden&&this._isContentShown&&(this._eventEmitter.emitAsync(i.UIEvent.MAIN_BLOCK_HIDE),this._bottomBlock.hideContent(),this._topBlock.hideContent(),this._tooltipService.hide(),this._isContentShown=!1)},e.prototype.disableShowingContent=function(){this._isContentShowingEnabled=!1,this._hideContent()},e.prototype.enableShowingContent=function(){this._isContentShowingEnabled=!0,this._shouldShowContent&&this._showContent()},e.prototype.hide=function(){this.isHidden=!0,this._topBlock.hide(),this._bottomBlock.hide()},e.prototype.show=function(){this._config.hideMainUI||(this.isHidden=!1,this._topBlock.show(),this._bottomBlock.show())},e.prototype.setShouldAlwaysShow=function(e){this._shouldAlwaysShow=e,this._shouldAlwaysShow?this._tryShowContent():this._startHideBlockTimeout()},e.prototype.destroy=function(){this._stopHideBlockTimeout(),this._unbindEvents(),this.view.destroy()},e.moduleName="mainUIBlock",e.View=s.default,e.dependencies=["config","screen","rootContainer","tooltipService","eventEmitter","topBlock","bottomBlock"],(0,o.__decorate)([(0,r.default)("hideMainUI")],e.prototype,"hide",null),(0,o.__decorate)([(0,r.default)("showMainUI")],e.prototype,"show",null),(0,o.__decorate)([(0,r.default)("setMainUIShouldAlwaysShow")],e.prototype,"setShouldAlwaysShow",null),e}();t.default=a},24688:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(92712),i=(0,o.__importDefault)(n(30313)),r=n(72906),s=(0,o.__importDefault)(n(61045)),a=(0,o.__importDefault)(n(51971)),l=function(e){function t(t){var n=e.call(this)||this;return n._initDOM(t.elements),n}return(0,o.__extends)(t,e),t.prototype._initDOM=function(e){this._$rootElement=(0,s.default)((0,r.mainUIBlockTemplate)({styles:this.styleNames}));var t=document.createElement("div");t.classList.add(this.styleNames.tooltipContainerWrapper),t.appendChild(e.tooltipContainer),this._$rootElement.appendChild(e.topBlock),this._$rootElement.appendChild(t),this._$rootElement.appendChild(e.bottomBlock)},t.prototype.getElement=function(){return this._$rootElement},t.prototype.destroy=function(){this._$rootElement.parentNode&&this._$rootElement.parentNode.removeChild(this._$rootElement),this._$rootElement=null},t}(i.default);l.extendStyleNames(a.default),t.default=l},72906:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mainUIBlockTemplate=void 0;var o=(0,n(92712).__importDefault)(n(93198)),i=o.default.default?o.default.default:o.default;t.mainUIBlockTemplate=i},93198:function(e){e.exports={__esModule:!0,default:function(e){return'
'}}},25550:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(92712),i=n(24590),r=(0,o.__importDefault)(n(17022)),s=(0,o.__importDefault)(n(51551)),a=function(){function e(e){var t=e.eventEmitter,n=e.engine,o=e.rootContainer,i=e.theme,r=e.config,s=e.mainUIBlock,a=e.loader;this.isHidden=!1,this._eventEmitter=t,this._engine=n,this._theme=i,this._mainUIBlock=s,this._loader=a,this._bindEvents(),this._initUI(),this.setPoster(r.poster),r.hideOverlay&&this.hide(),o.appendComponentElement(this.getElement())}return e.prototype.getElement=function(){return this.view.getElement()},e.prototype._initUI=function(){var t={callbacks:{onPlayClick:this._playVideo.bind(this)},theme:this._theme};this.view=new e.View(t)},e.prototype._bindEvents=function(){this._unbindEvents=this._eventEmitter.bindEvents([[i.VideoEvent.STATE_CHANGED,this._updatePlayingState],[i.VideoEvent.RESET,this._tryShowContent]],this)},e.prototype._updatePlayingState=function(e){var t=e.nextState;t===i.EngineState.PLAY_REQUESTED?this._tryHideContent():t!==i.EngineState.ENDED&&t!==i.EngineState.SRC_SET||this._tryShowContent()},e.prototype._playVideo=function(){this._engine.play(),this._eventEmitter.emitAsync(i.UIEvent.PLAY_OVERLAY_CLICK)},e.prototype._tryShowContent=function(){this.isHidden||this._engine.isPaused&&this._showContent()},e.prototype._tryHideContent=function(){this.isHidden||this._hideContent()},e.prototype._hideContent=function(){this.view.hideContent(),this._loader.show(),this._mainUIBlock.enableShowingContent()},e.prototype._showContent=function(){this.view.showContent(),this._loader.hide(),this._mainUIBlock.disableShowingContent()},e.prototype.hide=function(){this.isHidden=!0,this.view.hide()},e.prototype.show=function(){this.isHidden=!1,this.view.show()},e.prototype.setPoster=function(e){this.view.setPoster(e)},e.prototype.turnOnOverlayTransparency=function(){this.view.turnOnOverlayTransparency()},e.prototype.turnOffOverlayTransparency=function(){this.view.turnOffOverlayTransparency()},e.prototype.destroy=function(){this._unbindEvents(),this.view.destroy()},e.moduleName="overlay",e.View=s.default,e.dependencies=["engine","eventEmitter","rootContainer","theme","config","mainUIBlock","loader"],(0,o.__decorate)([(0,r.default)("hideOverlay")],e.prototype,"hide",null),(0,o.__decorate)([(0,r.default)("showOverlay")],e.prototype,"show",null),(0,o.__decorate)([(0,r.default)()],e.prototype,"setPoster",null),(0,o.__decorate)([(0,r.default)()],e.prototype,"turnOnOverlayTransparency",null),(0,o.__decorate)([(0,r.default)()],e.prototype,"turnOffOverlayTransparency",null),e}();t.default=a},69317:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={overlayPlaySvgFill:{fill:function(e){return e.color}},overlayPlaySvgStroke:{stroke:function(e){return e.color}}}},51551:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(92712),i=(0,o.__importDefault)(n(30313)),r=n(66029),s=(0,o.__importDefault)(n(61045)),a=(0,o.__importDefault)(n(46484)),l=(0,o.__importDefault)(n(69317)),u=(0,o.__importDefault)(n(25239)),c=function(e){function t(t){var n=e.call(this,t.theme)||this,o=t.callbacks;return n._callbacks=o,n._initDOM(),n._bindEvents(),n}return(0,o.__extends)(t,e),t.prototype._initDOM=function(){this._$rootElement=(0,s.default)((0,r.overlayTemplate)({styles:this.styleNames,themeStyles:this.themeStyles})),this._$content=(0,a.default)(this._$rootElement,"overlay-content"),this._$playButton=(0,a.default)(this._$rootElement,"overlay-play-button")},t.prototype._bindEvents=function(){this._$playButton.addEventListener("click",this._callbacks.onPlayClick)},t.prototype._unbindEvents=function(){this._$playButton.removeEventListener("click",this._callbacks.onPlayClick)},t.prototype.getElement=function(){return this._$rootElement},t.prototype.hideContent=function(){this._$rootElement.classList.remove(this.styleNames.active)},t.prototype.showContent=function(){this._$rootElement.classList.add(this.styleNames.active)},t.prototype.hide=function(){this._$rootElement.classList.add(this.styleNames.hidden)},t.prototype.show=function(){this._$rootElement.classList.remove(this.styleNames.hidden)},t.prototype.setPoster=function(e){this._$content.style.backgroundImage=e?"url('".concat(e,"')"):"none"},t.prototype.turnOnOverlayTransparency=function(){this._$content.classList.add(this.styleNames.transparency)},t.prototype.turnOffOverlayTransparency=function(){this._$content.classList.remove(this.styleNames.transparency)},t.prototype.destroy=function(){this._unbindEvents(),this._$rootElement.parentNode&&this._$rootElement.parentNode.removeChild(this._$rootElement),this._$rootElement=null,this._$content=null,this._$playButton=null},t}(i.default);c.setTheme(l.default),c.extendStyleNames(u.default),t.default=c},66029:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.overlayTemplate=void 0;var o=(0,n(92712).__importDefault)(n(86340)),i=o.default.default?o.default.default:o.default;t.overlayTemplate=i},86340:function(e){e.exports={__esModule:!0,default:function(e){return'
\x3c!-- padding-bottom: 100% * height/width --\x3e
'}}},29186:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=(0,n(92712).__importDefault)(n(69554)),i=function(){function e(e){var t=e.previewService,n=e.rootContainer;this._previewService=t,this._initUI(),this.hide(),n.appendComponentElement(this.getElement())}return e.prototype._initUI=function(){this.view=new e.View},e.prototype.getElement=function(){return this.view.getElement()},e.prototype.showAt=function(e){this.view.show();var t=this._previewService.getAt(e);if(t){var n=t.pop();this._currentFrame&&this._currentFrame.spriteUrl!==n.spriteUrl&&this.view.clear(),this.view.setPreview(n),this._currentFrame=n}else this.view.clear()},e.prototype.hide=function(){this.view.hide()},e.prototype.destroy=function(){this.view.destroy()},e.moduleName="previewFullSize",e.View=o.default,e.dependencies=["previewService","rootContainer"],e}();t.default=i},69554:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(92712),i=(0,o.__importDefault)(n(30313)),r=n(40814),s=(0,o.__importDefault)(n(61045)),a=(0,o.__importDefault)(n(46484)),l=(0,o.__importDefault)(n(86025)),u=function(e){function t(){var t=e.call(this)||this;return t._initDOM(),t}return(0,o.__extends)(t,e),t.prototype._initDOM=function(){this._$rootElement=(0,s.default)((0,r.previewTemplate)({styles:this.styleNames})),this._$frame=(0,a.default)(this._$rootElement,"preview-full-size-frame")},t.prototype.getElement=function(){return this._$rootElement},t.prototype.setPreview=function(e){this._applyFrame(e)},t.prototype._applyFrame=function(e){var t=this._$frame.offsetWidth,n=this._$frame.offsetHeight,o=t*e.framesInSprite.horz,i=n*e.framesInSprite.vert;this._$frame.style.background="url('".concat(e.spriteUrl,"') -").concat(t*e.framePositionInSprite.horz,"px -").concat(n*e.framePositionInSprite.vert,"px / ").concat(o,"px ").concat(i,"px")},t.prototype.clear=function(){this._$frame.style.background=""},t.prototype.show=function(){this._$rootElement.classList.remove(this.styleNames.hidden)},t.prototype.hide=function(){this._$rootElement.classList.add(this.styleNames.hidden)},t.prototype.destroy=function(){this._$rootElement.parentNode&&this._$rootElement.parentNode.removeChild(this._$rootElement),this._$frame=null,this._$rootElement=null},t}(i.default);u.extendStyleNames(l.default),t.default=u},40814:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.previewTemplate=void 0;var o=(0,n(92712).__importDefault)(n(88035)),i=o.default.default?o.default.default:o.default;t.previewTemplate=i},88035:function(e){e.exports={__esModule:!0,default:function(e){return'
'}}},6277:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAt=void 0,t.getAt=function(e,t,n){var o=e.framesCount,i=Math.floor(t*o/n);return e.qualities.map((function(e){return function(e,t,n){var o=t.framesInSprite.vert*t.framesInSprite.horz,i=n%o,r=Math.floor(n/o),s=i%t.framesInSprite.horz,a=Math.floor(i/t.framesInSprite.vert),l=t.spriteUrlMask.replace("%d",r.toString());return{frameSize:t.frameSize,framesInSprite:(r+1)*o<=e?t.framesInSprite:{horz:t.framesInSprite.horz,vert:Math.ceil(e%o/t.framesInSprite.vert)},framePositionInSprite:{vert:a,horz:s},spriteUrl:l}}(o,e,i)}))}},82300:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(92712),i=(0,o.__importDefault)(n(17022)),r=n(6277),s=function(){function e(e){var t=e.engine;this._engine=t}return e.prototype.setFramesMap=function(e){this._framesMap=e},e.prototype.getAt=function(e){if(this._framesMap){var t=this._engine.getDuration();if(t)return(0,r.getAt)(this._framesMap,e,t)}},e.prototype.destroy=function(){this._framesMap=null},e.moduleName="previewService",e.dependencies=["engine"],(0,o.__decorate)([(0,i.default)()],e.prototype,"setFramesMap",null),e}();t.default=s},37526:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=(0,n(92712).__importDefault)(n(64617)),i=function(){function e(e){var t=e.previewService;this._previewService=t,this._initUI()}return e.prototype._initUI=function(){this.view=new e.View},e.prototype.getElement=function(){return this.view.getElement()},e.prototype.showAt=function(e){var t=this._previewService.getAt(e);t?(this.view.showWithPreview(),this._currentFrames&&(this._currentFrames[0].spriteUrl!==t[0].spriteUrl&&this.view.clearLowQualityPreview(),this._currentFrames[1].spriteUrl!==t[1].spriteUrl&&this.view.clearHighQualityPreview()),this.view.setLowQualityPreview(t[0]),this.view.setHighQualityPreview(t[1]),this._currentFrames=t):this.view.showAsEmpty()},e.prototype.setTime=function(e){this.view.setTime(e)},e.prototype.destroy=function(){this.view.destroy()},e.moduleName="previewThumbnail",e.View=o.default,e.dependencies=["previewService"],e}();t.default=i},64617:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(92712),i=(0,o.__importDefault)(n(30313)),r=n(70803),s=(0,o.__importDefault)(n(61045)),a=(0,o.__importDefault)(n(46484)),l=(0,o.__importDefault)(n(52190)),u=function(e){function t(){var t=e.call(this)||this;return t._initDOM(),t}return(0,o.__extends)(t,e),t.prototype._initDOM=function(){this._$rootElement=(0,s.default)((0,r.thumbnailTemplate)({styles:this.styleNames})),this._$timeText=(0,a.default)(this._$rootElement,"thumb-text-block"),this._$lowQualityThumb=(0,a.default)(this._$rootElement,"thumb-low-quality"),this._$highQualityThumb=(0,a.default)(this._$rootElement,"thumb-high-quality")},t.prototype.getElement=function(){return this._$rootElement},t.prototype.showAsEmpty=function(){this._$rootElement.classList.add(this.styleNames.empty)},t.prototype.showWithPreview=function(){this._$rootElement.classList.remove(this.styleNames.empty)},t.prototype.clearLowQualityPreview=function(){this._$lowQualityThumb.style.background=""},t.prototype.clearHighQualityPreview=function(){this._$highQualityThumb.style.background=""},t.prototype.setLowQualityPreview=function(e){this._applyQualityToThumbElement(this._$lowQualityThumb,e)},t.prototype.setHighQualityPreview=function(e){this._applyQualityToThumbElement(this._$highQualityThumb,e)},t.prototype._applyQualityToThumbElement=function(e,t){var n=e.offsetWidth,o=e.offsetHeight,i=n*t.framesInSprite.horz,r=o*t.framesInSprite.vert;e.style.background="url('".concat(t.spriteUrl,"') -").concat(n*t.framePositionInSprite.horz,"px -").concat(o*t.framePositionInSprite.vert,"px / ").concat(i,"px ").concat(r,"px")},t.prototype.setTime=function(e){this._$timeText.innerText=e},t.prototype.destroy=function(){this._$rootElement.parentNode&&this._$rootElement.parentNode.removeChild(this._$rootElement),this._$timeText=null,this._$lowQualityThumb=null,this._$highQualityThumb=null,this._$rootElement=null},t}(i.default);u.extendStyleNames(l.default),t.default=u},70803:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.thumbnailTemplate=void 0;var o=(0,n(92712).__importDefault)(n(88386)),i=o.default.default?o.default.default:o.default;t.thumbnailTemplate=i},88386:function(e){e.exports={__esModule:!0,default:function(e){return'
'}}},59057:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(92712),i=n(24590),r=(0,o.__importDefault)(n(22366)),s=(0,o.__importDefault)(n(17022)),a=function(){function e(e){var t=e.config,n=e.eventEmitter,o=e.engine,i=e.fullScreenManager,r=e.interactionIndicator,s=e.rootContainer;this._eventEmitter=n,this._engine=o,this._fullScreenManager=i,this._interactionIndicator=r,this.isHidden=!1,this._delayedToggleVideoPlaybackTimeout=null,this._isClickProcessingDisabled=Boolean(t.disableControlWithClickOnPlayer),this._bindCallbacks(),this._initUI(t.nativeBrowserControls),this._bindEvents(),s.appendComponentElement(this.getElement())}return e.prototype.getElement=function(){return this.view.getElement()},e.prototype._bindCallbacks=function(){this._processClick=this._processClick.bind(this),this._processDblClick=this._processDblClick.bind(this),this._toggleVideoPlayback=this._toggleVideoPlayback.bind(this)},e.prototype._initUI=function(e){var t={nativeControls:e,callbacks:{onWrapperMouseClick:this._processClick,onWrapperMouseDblClick:this._processDblClick},playbackViewElement:this._engine.getElement()};this.view=new r.default(t)},e.prototype._bindEvents=function(){this._unbindEvents=this._eventEmitter.bindEvents([[i.UIEvent.PLAY_OVERLAY_CLICK,this.view.focusOnNode,this.view],[i.UIEvent.RESIZE,this._updateSizes],[i.EngineState.SRC_SET,this.view.resetBackground,this.view],[i.EngineState.METADATA_LOADED,this.view.resetAspectRatio,this.view]],this)},e.prototype._updateSizes=function(e){var t=e.width,n=e.height;this.view.setBackgroundSize(t,n),this.view.resetAspectRatio()},e.prototype.showCursor=function(){this.view.showCursor()},e.prototype.hideCursor=function(){this.view.hideCursor()},e.prototype._processClick=function(){this._isClickProcessingDisabled||(this._showPlaybackChangeIndicator(),this._fullScreenManager.isEnabled?this._setDelayedPlaybackToggle():this._toggleVideoPlayback())},e.prototype._processDblClick=function(){this._isClickProcessingDisabled||this._fullScreenManager.isEnabled&&(this._isDelayedPlaybackToggleExist&&(this._clearDelayedPlaybackToggle(),this._hideDelayedPlaybackChangeIndicator()),this._toggleFullScreen())},e.prototype._showPlaybackChangeIndicator=function(){var e=this._engine.getCurrentState();e===i.EngineState.PLAY_REQUESTED||e===i.EngineState.PLAYING?this._interactionIndicator.showPause():this._interactionIndicator.showPlay()},e.prototype._hideDelayedPlaybackChangeIndicator=function(){this._interactionIndicator.hideIcons()},e.prototype._setDelayedPlaybackToggle=function(){this._clearDelayedPlaybackToggle(),this._delayedToggleVideoPlaybackTimeout=window.setTimeout(this._toggleVideoPlayback,300)},e.prototype._clearDelayedPlaybackToggle=function(){window.clearTimeout(this._delayedToggleVideoPlaybackTimeout),this._delayedToggleVideoPlaybackTimeout=null},Object.defineProperty(e.prototype,"_isDelayedPlaybackToggleExist",{get:function(){return Boolean(this._delayedToggleVideoPlaybackTimeout)},enumerable:!1,configurable:!0}),e.prototype._toggleVideoPlayback=function(){this._clearDelayedPlaybackToggle();var e=this._engine.getCurrentState();e===i.EngineState.PLAY_REQUESTED||e===i.EngineState.PLAYING?(this._engine.pause(),this._eventEmitter.emitAsync(i.UIEvent.PAUSE_WITH_SCREEN_CLICK)):(this._engine.play(),this._eventEmitter.emitAsync(i.UIEvent.PLAY_WITH_SCREEN_CLICK))},e.prototype._toggleFullScreen=function(){this._fullScreenManager.isInFullScreen?(this._fullScreenManager.exitFullScreen(),this._eventEmitter.emitAsync(i.UIEvent.EXIT_FULL_SCREEN_WITH_SCREEN_CLICK)):(this._fullScreenManager.enterFullScreen(),this._eventEmitter.emitAsync(i.UIEvent.ENTER_FULL_SCREEN_WITH_SCREEN_CLICK))},e.prototype.hide=function(){this.isHidden||(this.view.hide(),this.isHidden=!0)},e.prototype.show=function(){this.isHidden&&(this.view.show(),this.isHidden=!1)},e.prototype.setVideoViewMode=function(e){this.view.setViewMode(e)},e.prototype.destroy=function(){this._unbindEvents(),this._clearDelayedPlaybackToggle(),this.view.destroy()},e.moduleName="screen",e.View=r.default,e.dependencies=["engine","eventEmitter","config","fullScreenManager","interactionIndicator","rootContainer"],(0,o.__decorate)([(0,s.default)()],e.prototype,"setVideoViewMode",null),e}();t.default=a},22366:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(92712),i=(0,o.__importDefault)(n(30313)),r=n(87085),s=(0,o.__importDefault)(n(61045)),a=(0,o.__importDefault)(n(46484)),l=(0,o.__importDefault)(n(23802)),u=n(5777),c=(0,o.__importDefault)(n(31175)),d=function(e){function t(t){var n,o=e.call(this)||this,i=t.callbacks,r=t.nativeControls,s=t.playbackViewElement;return o._callbacks=i,o._styleNamesByViewMode=((n={})[u.VideoViewMode.REGULAR]=o.styleNames.regularMode,n[u.VideoViewMode.BLUR]=o.styleNames.blurMode,n[u.VideoViewMode.FILL]=o.styleNames.fillMode,n),o._bindCallbacks(),r&&s.setAttribute("controls","true"),o._initDOM(s),o._bindEvents(),o.setViewMode(u.VideoViewMode.REGULAR),o}return(0,o.__extends)(t,e),t.prototype._bindCallbacks=function(){this._updateBackground=this._updateBackground.bind(this)},t.prototype._initDOM=function(e){this._$rootElement=(0,s.default)((0,r.screenTemplate)({styles:this.styleNames})),this._$playbackElement=e,this._$rootElement.appendChild(e),this._$canvas=(0,a.default)(this._$rootElement,"background-canvas")},t.prototype._bindEvents=function(){this._$rootElement.addEventListener("click",this._callbacks.onWrapperMouseClick),this._$rootElement.addEventListener("dblclick",this._callbacks.onWrapperMouseDblClick)},t.prototype._unbindEvents=function(){this._$rootElement.removeEventListener("click",this._callbacks.onWrapperMouseClick),this._$rootElement.removeEventListener("dblclick",this._callbacks.onWrapperMouseDblClick)},t.prototype.focusOnNode=function(){this._$rootElement.focus()},t.prototype.show=function(){(0,l.default)(this._$rootElement,this.styleNames.hidden,!1)},t.prototype.hide=function(){(0,l.default)(this._$rootElement,this.styleNames.hidden,!0)},t.prototype.getElement=function(){return this._$rootElement},t.prototype.hideCursor=function(){(0,l.default)(this._$rootElement,this.styleNames.hiddenCursor,!0)},t.prototype.showCursor=function(){(0,l.default)(this._$rootElement,this.styleNames.hiddenCursor,!1)},t.prototype.setViewMode=function(e){var t=this;this._styleNamesByViewMode[e]&&(this.resetBackground(),Object.keys(this._styleNamesByViewMode).forEach((function(e){(0,l.default)(t._$rootElement,t._styleNamesByViewMode[e],!1)})),(0,l.default)(this._$rootElement,this._styleNamesByViewMode[e],!0),e===u.VideoViewMode.BLUR?this._startUpdatingBackground():this._stopUpdatingBackground(),this._currentMode=e)},t.prototype.setBackgroundSize=function(e,t){this.setBackgroundWidth(e),this.setBackgroundHeight(t)},t.prototype.setBackgroundWidth=function(e){this._$canvas.width=e},t.prototype.setBackgroundHeight=function(e){this._$canvas.height=e},t.prototype._startUpdatingBackground=function(){this._requestAnimationFrameID||this._updateBackground()},t.prototype._stopUpdatingBackground=function(){this._requestAnimationFrameID&&(cancelAnimationFrame(this._requestAnimationFrameID),this._requestAnimationFrameID=null)},t.prototype.resetAspectRatio=function(){var e=this._$playbackElement,t=e.videoWidth,n=e.videoHeight,o=this._$rootElement.getBoundingClientRect(),i=o.width,r=o.height;this._isHorizontalStripes=i/r<(n?t/n:0),(0,l.default)(this._$rootElement,this.styleNames.horizontalStripes,this._isHorizontalStripes),(0,l.default)(this._$rootElement,this.styleNames.verticalStripes,!this._isHorizontalStripes)},t.prototype.resetBackground=function(){this._currentMode===u.VideoViewMode.BLUR&&this._clearBackground()},t.prototype._getSourceAreas=function(e,t){return this._isHorizontalStripes?[[0,0,e,1],[0,t-1,e,1]]:[[0,0,1,t],[e-1,0,1,t]]},t.prototype._getCanvasAreas=function(e,t){return this._isHorizontalStripes?[[0,0,e,t/2],[0,t/2,e,t/2]]:[[0,0,e/2,t],[e/2,0,e/2,t]]},t.prototype._drawAreaFromSource=function(e,t){var n=e[0],o=e[1],i=e[2],r=e[3],s=t[0],a=t[1],l=t[2],u=t[3];this._$canvas.getContext("2d").drawImage(this._$playbackElement,n,o,i,r,s,a,l,u)},t.prototype._drawBackground=function(){var e=this._$playbackElement,t=e.videoWidth,n=e.videoHeight,o=this._$canvas.width,i=this._$canvas.height,r=this._getSourceAreas(t,n),s=this._getCanvasAreas(o,i);this._drawAreaFromSource(r[0],s[0]),this._drawAreaFromSource(r[1],s[1])},t.prototype._updateBackground=function(){this._drawBackground(),this._requestAnimationFrameID=requestAnimationFrame(this._updateBackground)},t.prototype._clearBackground=function(){this._$canvas.getContext("2d").clearRect(0,0,this._$canvas.width,this._$canvas.height)},t.prototype.destroy=function(){this._stopUpdatingBackground(),this._unbindEvents(),this._$rootElement.parentNode&&this._$rootElement.parentNode.removeChild(this._$rootElement),this._$rootElement=null,this._$playbackElement=null,this._$canvas=null},t}(i.default);d.extendStyleNames(c.default),t.default=d},87085:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.screenTemplate=void 0;var o=(0,n(92712).__importDefault)(n(41143)),i=o.default.default?o.default.default:o.default;t.screenTemplate=i},41143:function(e){e.exports={__esModule:!0,default:function(e){return'
'}}},5777:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.VideoViewMode=void 0,function(e){e.REGULAR="REGULAR",e.BLUR="BLUR",e.FILL="FILL"}(n||(n={})),t.VideoViewMode=n},20632:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.titleTemplate=void 0;var o=(0,n(92712).__importDefault)(n(72425)),i=o.default.default?o.default.default:o.default;t.titleTemplate=i},72425:function(e){e.exports={__esModule:!0,default:function(e){return'
'}}},53983:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(92712),i=(0,o.__importDefault)(n(34325)),r=(0,o.__importDefault)(n(17022)),s=function(){function e(e){var t=e.theme,n=e.config;this._theme=t,this._bindCallbacks(),this._initUI(),this.setTitle(n.title)}return e.prototype.getElement=function(){return this.view.getElement()},e.prototype._bindCallbacks=function(){this._triggerCallback=this._triggerCallback.bind(this)},e.prototype._initUI=function(){var t={theme:this._theme,callbacks:{onClick:this._triggerCallback}};this.view=new e.View(t),this.view.setTitle()},e.prototype.setTitle=function(e){this.view.setTitle(e)},e.prototype.setTitleClickCallback=function(e){this._callback=e,this.view.setDisplayAsLink(Boolean(this._callback))},e.prototype._triggerCallback=function(){this._callback&&this._callback()},e.prototype.hide=function(){this.isHidden=!0,this.view.hide()},e.prototype.show=function(){this.isHidden=!1,this.view.show()},e.prototype.destroy=function(){this.view.destroy()},e.moduleName="title",e.View=i.default,e.dependencies=["config","theme"],(0,o.__decorate)([(0,r.default)()],e.prototype,"setTitle",null),(0,o.__decorate)([(0,r.default)()],e.prototype,"setTitleClickCallback",null),e}();t.default=s},265:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={titleText:{color:function(e){return e.color}}}},34325:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(92712),i=(0,o.__importDefault)(n(30313)),r=n(20632),s=(0,o.__importDefault)(n(61045)),a=(0,o.__importDefault)(n(23802)),l=(0,o.__importDefault)(n(265)),u=(0,o.__importDefault)(n(59932)),c=function(e){function t(t){var n=this,o=t.callbacks,i=t.theme;return(n=e.call(this,i)||this)._callbacks=o,n._initDOM(),n._bindEvents(),n}return(0,o.__extends)(t,e),t.prototype._initDOM=function(){this._$rootElement=(0,s.default)((0,r.titleTemplate)({styles:this.styleNames,themeStyles:this.themeStyles}))},t.prototype._bindEvents=function(){this._$rootElement.addEventListener("click",this._callbacks.onClick)},t.prototype._unbindEvents=function(){this._$rootElement.removeEventListener("click",this._callbacks.onClick)},t.prototype.setDisplayAsLink=function(e){(0,a.default)(this._$rootElement,this.styleNames.link,e)},t.prototype.setTitle=function(e){e?(this.show(),this._$rootElement.innerHTML=e):this.hide()},t.prototype.show=function(){this._$rootElement.classList.remove(this.styleNames.hidden)},t.prototype.hide=function(){this._$rootElement.classList.add(this.styleNames.hidden)},t.prototype.getElement=function(){return this._$rootElement},t.prototype.destroy=function(){this._unbindEvents(),this._$rootElement.parentNode&&this._$rootElement.parentNode.removeChild(this._$rootElement),this._$rootElement=null},t}(i.default);c.setTheme(l.default),c.extendStyleNames(u.default),t.default=c},11805:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.topBlockTemplate=void 0;var o=(0,n(92712).__importDefault)(n(63978)),i=o.default.default?o.default.default:o.default;t.topBlockTemplate=i},63978:function(e){e.exports={__esModule:!0,default:function(e){return'
'}}},20407:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(92712),i=(0,o.__importDefault)(n(17022)),r=(0,o.__importDefault)(n(16409)),s=function(){function e(e){this._isBlockFocused=!1,this.isHidden=!1,this._bindViewCallbacks(),this._initUI(this._getElements(e))}return e.prototype._bindViewCallbacks=function(){this._setFocusState=this._setFocusState.bind(this),this._removeFocusState=this._removeFocusState.bind(this)},e.prototype._initUI=function(t){var n={elements:t,callbacks:{onBlockMouseMove:this._setFocusState,onBlockMouseOut:this._removeFocusState}};this.view=new e.View(n)},e.prototype._getElements=function(e){var t=e.title,n=e.liveIndicator;return{title:t.getElement(),liveIndicator:n.getElement()}},e.prototype._setFocusState=function(){this._isBlockFocused=!0},e.prototype._removeFocusState=function(){this._isBlockFocused=!1},Object.defineProperty(e.prototype,"isFocused",{get:function(){return this._isBlockFocused},enumerable:!1,configurable:!0}),e.prototype.getElement=function(){return this.view.getElement()},e.prototype.hide=function(){this.isHidden=!0,this.view.hide()},e.prototype.show=function(){this.isHidden=!1,this.view.show()},e.prototype.showTitle=function(){this.view.showTitle()},e.prototype.hideTitle=function(){this.view.hideTitle()},e.prototype.showLiveIndicator=function(){this.view.showLiveIndicator()},e.prototype.hideLiveIndicator=function(){this.view.hideLiveIndicator()},e.prototype.showContent=function(){this.view.showContent()},e.prototype.hideContent=function(){this.view.hideContent()},e.prototype.destroy=function(){this.view.destroy()},e.moduleName="topBlock",e.View=r.default,e.dependencies=["title","liveIndicator"],(0,o.__decorate)([(0,i.default)()],e.prototype,"showTitle",null),(0,o.__decorate)([(0,i.default)()],e.prototype,"hideTitle",null),(0,o.__decorate)([(0,i.default)()],e.prototype,"showLiveIndicator",null),(0,o.__decorate)([(0,i.default)()],e.prototype,"hideLiveIndicator",null),e}();t.default=s},16409:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(92712),i=(0,o.__importDefault)(n(30313)),r=(0,o.__importDefault)(n(61045)),s=(0,o.__importDefault)(n(46484)),a=n(11805),l=(0,o.__importDefault)(n(14600)),u=function(e){function t(t){var n=e.call(this)||this,o=t.callbacks,i=t.elements;return n._callbacks=o,n._initDOM(i),n._bindEvents(),n}return(0,o.__extends)(t,e),t.prototype.getElement=function(){return this._$rootElement},t.prototype._initDOM=function(e){this._$rootElement=(0,r.default)((0,a.topBlockTemplate)({styles:this.styleNames})),this._$titleContainer=(0,s.default)(this._$rootElement,"title-container"),this._$liveIndicatorContainer=(0,s.default)(this._$rootElement,"live-indicator-container"),this._$titleContainer.appendChild(e.title),this._$liveIndicatorContainer.appendChild(e.liveIndicator)},t.prototype._preventClickPropagation=function(e){e.stopPropagation()},t.prototype._bindEvents=function(){this._$rootElement.addEventListener("click",this._preventClickPropagation),this._$rootElement.addEventListener("mousemove",this._callbacks.onBlockMouseMove),this._$rootElement.addEventListener("mouseleave",this._callbacks.onBlockMouseOut)},t.prototype._unbindEvents=function(){this._$rootElement.removeEventListener("click",this._preventClickPropagation),this._$rootElement.removeEventListener("mousemove",this._callbacks.onBlockMouseMove),this._$rootElement.removeEventListener("mouseleave",this._callbacks.onBlockMouseOut)},t.prototype.show=function(){this._$rootElement.classList.remove(this.styleNames.hidden)},t.prototype.hide=function(){this._$rootElement.classList.add(this.styleNames.hidden)},t.prototype.showContent=function(){this._$rootElement.classList.add(this.styleNames.activated)},t.prototype.hideContent=function(){this._$rootElement.classList.remove(this.styleNames.activated)},t.prototype.showTitle=function(){this._$titleContainer.classList.remove(this.styleNames.hidden)},t.prototype.hideTitle=function(){this._$titleContainer.classList.add(this.styleNames.hidden)},t.prototype.showLiveIndicator=function(){this._$liveIndicatorContainer.classList.remove(this.styleNames.hidden)},t.prototype.hideLiveIndicator=function(){this._$liveIndicatorContainer.classList.add(this.styleNames.hidden)},t.prototype.destroy=function(){this._unbindEvents(),this._$rootElement.parentNode&&this._$rootElement.parentNode.removeChild(this._$rootElement),this._$rootElement=null},t}(i.default);u.extendStyleNames(l.default),t.default=u},56398:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isSafari=t.isDesktopSafari=t.isAndroid=t.isIOS=t.isIPad=t.isIPod=t.isIPhone=void 0;var n=/iphone/i,o=/ipod/i,i=/ipad/i,r=/(android)/i,s=/^((?!chrome|android).)*safari/i,a=/^((?!chrome|android|iphone|ipod|ipad).)*safari/i,l=function(){return!!window.MSStream},u=function(){return window.navigator&&window.navigator.userAgent},c=function(){return!l()&&n.test(u())};t.isIPhone=c;var d=function(){return!l()&&o.test(u())};t.isIPod=d;var p=function(){return!l()&&i.test(u())};t.isIPad=p;t.isIOS=function(){return c()||d()||p()};t.isAndroid=function(){return r.test(u())};t.isDesktopSafari=function(){return a.test(u())};t.isSafari=function(){return s.test(u())}},33023:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NativeEnvironmentSupport=t.isBrowser=void 0,t.isBrowser="undefined"!=typeof window,t.NativeEnvironmentSupport={MSE:!1,HLS:!1,DASH:!1,MP4:!1,WEBM:!1,OGG:!1,MOV:!1,MKV:!1},function(){if(t.isBrowser){t.NativeEnvironmentSupport.MSE="WebKitMediaSource"in window||"MediaSource"in window;var e=document.createElement("video");"function"==typeof e.canPlayType&&((e.canPlayType("application/x-mpegURL")||e.canPlayType("application/vnd.apple.mpegURL"))&&(t.NativeEnvironmentSupport.HLS=!0),e.canPlayType("application/dash+xml")&&(t.NativeEnvironmentSupport.DASH=!0),e.canPlayType("video/mp4")&&(t.NativeEnvironmentSupport.MP4=!0),e.canPlayType("video/webm")&&(t.NativeEnvironmentSupport.WEBM=!0),e.canPlayType("video/ogg")&&(t.NativeEnvironmentSupport.OGG=!0),e.canPlayType("video/quicktime")&&(t.NativeEnvironmentSupport.MOV=!0),e.canPlayType("video/x-matroska")&&(t.NativeEnvironmentSupport.MKV=!0))}}()},43450:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KEYCODES=void 0;var o=n(92712),i=n(4399),r=(0,o.__importDefault)(n(35005));t.KEYCODES={SPACE_BAR:32,ENTER:13,TAB:9,LEFT_ARROW:37,RIGHT_ARROW:39,UP_ARROW:38,DOWN_ARROW:40,DEBUG_KEY:68};var s=function(){function e(e,t){this._eventEmitter=new i.EventEmitter,this._element=e,t&&this._attachCallbacks(t),this._bindCallbacks(),this._bindEvents()}return e.prototype._attachCallbacks=function(e){var t=this;Object.keys(e).forEach((function(n){var o=e[n];Array.isArray(o)?o.forEach((function(e){return t._eventEmitter.on(n,e)})):t._eventEmitter.on(n,o)}))},e.prototype._unattachCallbacks=function(){this._eventEmitter.removeAllListeners()},e.prototype._bindCallbacks=function(){this._processKeyboardInput=this._processKeyboardInput.bind(this)},e.prototype._bindEvents=function(){this._element.addEventListener("keydown",this._processKeyboardInput,!1)},e.prototype._unbindEvents=function(){this._element.removeEventListener("keydown",this._processKeyboardInput,!1)},e.prototype.addCallbacks=function(e){this._attachCallbacks(e)},e.prototype._processKeyboardInput=function(e){this._eventEmitter.emit(e.keyCode,e)},Object.defineProperty(e.prototype,"_isDestroyed",{get:function(){return!this._element&&!this._eventEmitter},enumerable:!1,configurable:!0}),e.prototype.destroy=function(){this._isDestroyed?r.default.warn("KeyboardInterceptor.destroy called after already been destroyed"):(this._unbindEvents(),this._element=null,this._unattachCallbacks(),this._eventEmitter=null)},e}();t.default=s},35005:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(92712);t.default={info:function(e){for(var t,n=[],i=1;i0},e.prototype.connect_=function(){i&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),l?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){i&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;a.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),c=function(e,t){for(var n=0,o=Object.keys(t);n0},e}(),w="undefined"!=typeof WeakMap?new WeakMap:new o,S=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=u.getInstance(),o=new b(t,n,this);w.set(this,o)};["observe","unobserve","disconnect"].forEach((function(e){S.prototype[e]=function(){var t;return(t=w.get(this))[e].apply(t,arguments)}}));var T=void 0!==r.ResizeObserver?r.ResizeObserver:S;t.default=T},42662:function(t){"use strict";t.exports=e},5329:function(e){"use strict";e.exports=t},95561:function(e){"use strict";e.exports=n},448:function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,n,s):i(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}function l(e,t){return function(n,o){t(n,o,e)}}function u(e,t,n,o,i,r){function s(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var a,l=o.kind,u="getter"===l?"get":"setter"===l?"set":"value",c=!t&&e?o.static?e:e.prototype:null,d=t||(c?Object.getOwnPropertyDescriptor(c,o.name):{}),p=!1,h=n.length-1;h>=0;h--){var _={};for(var f in o)_[f]="access"===f?{}:o[f];for(var f in o.access)_.access[f]=o.access[f];_.addInitializer=function(e){if(p)throw new TypeError("Cannot add initializers after decoration has completed");r.push(s(e||null))};var v=(0,n[h])("accessor"===l?{get:d.get,set:d.set}:d[u],_);if("accessor"===l){if(void 0===v)continue;if(null===v||"object"!=typeof v)throw new TypeError("Object expected");(a=s(v.get))&&(d.get=a),(a=s(v.set))&&(d.set=a),(a=s(v.init))&&i.unshift(a)}else(a=s(v))&&("field"===l?i.unshift(a):d[u]=a)}c&&Object.defineProperty(c,o.name,d),p=!0}function c(e,t,n){for(var o=arguments.length>2,i=0;i0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function E(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var o,i,r=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(o=r.next()).done;)s.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return s}function g(){for(var e=[],t=0;t1||a(e,t)}))})}function a(e,t){try{(n=i[e](t)).value instanceof S?Promise.resolve(n.value.v).then(l,u):c(r[0][2],n)}catch(e){c(r[0][3],e)}var n}function l(e){a("next",e)}function u(e){a("throw",e)}function c(e,t){e(t),r.shift(),r.length&&a(r[0][0],r[0][1])}}function P(e){var t,n;return t={},o("next"),o("throw",(function(e){throw e})),o("return"),t[Symbol.iterator]=function(){return this},t;function o(o,i){t[o]=e[o]?function(t){return(n=!n)?{value:S(e[o](t)),done:!1}:i?i(t):t}:i}}function C(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=y(e),t={},o("next"),o("throw"),o("return"),t[Symbol.asyncIterator]=function(){return this},t);function o(n){t[n]=e[n]&&function(t){return new Promise((function(o,i){(function(e,t,n,o){Promise.resolve(o).then((function(t){e({value:t,done:n})}),t)})(o,i,(t=e[n](t)).done,t.value)}))}}}function O(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var I=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function L(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&v(t,e,n);return I(t,e),t}function A(e){return e&&e.__esModule?e:{default:e}}function M(e,t,n,o){if("a"===n&&!o)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?o:"a"===n?o.call(e):o?o.value:t.get(e)}function D(e,t,n,o,i){if("m"===o)throw new TypeError("Private method is not writable");if("a"===o&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===o?i.call(e,n):i?i.value=n:t.set(e,n),n}function k(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function N(e,t,n){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var o;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");o=t[Symbol.asyncDispose]}if(void 0===o){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");o=t[Symbol.dispose]}if("function"!=typeof o)throw new TypeError("Object not disposable.");e.stack.push({value:t,dispose:o,async:n})}else n&&e.stack.push({async:!0});return t}var x="function"==typeof SuppressedError?SuppressedError:function(e,t,n){var o=new Error(n);return o.name="SuppressedError",o.error=e,o.suppressed=t,o};function R(e){function t(t){e.error=e.hasError?new x(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}return function n(){for(;e.stack.length;){var o=e.stack.pop();try{var i=o.dispose&&o.dispose.call(o.value);if(o.async)return Promise.resolve(i).then(n,(function(e){return t(e),n()}))}catch(e){t(e)}}if(e.hasError)throw e.error}()}t.default={__extends:i,__assign:r,__rest:s,__decorate:a,__param:l,__metadata:h,__awaiter:_,__generator:f,__createBinding:v,__exportStar:m,__values:y,__read:E,__spread:g,__spreadArrays:b,__spreadArray:w,__await:S,__asyncGenerator:T,__asyncDelegator:P,__asyncValues:C,__makeTemplateObject:O,__importStar:L,__importDefault:A,__classPrivateFieldGet:M,__classPrivateFieldSet:D,__classPrivateFieldIn:k,__addDisposableResource:N,__disposeResources:R}}},i={};function r(e){var t=i[e];if(void 0!==t)return t.exports;var n=i[e]={id:e,exports:{}};return o[e].call(n.exports,n,n.exports,r),n.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var s={};return function(){"use strict";r.r(s),r.d(s,{components:function(){return sn}});var e=r(448),t=r.n(e),n=r(5329),o=r.n(n);const i=(e,t=0,{leading:n=!1,trailing:o=!0}={})=>{let i=null;return function(...r){n&&null===i&&e.apply(this,r),i&&clearTimeout(i),i=o&&n&&!i?setTimeout((()=>{i=null}),t):setTimeout((()=>{o&&e.apply(this,r),i=null}),t)}},a=e=>Object.entries(e).reduce(((e,[t,n])=>(t.includes("data-")&&(e[t]=n),e)),{});const l=(...e)=>e.map((e=>e?`wixui-${e}`:"")).join(" "),u=()=>{const e=o().useRef(),t=o().useRef([]);return[()=>void 0!==e.current?Promise.resolve(e.current):new Promise((e=>{t.current.push(e)})),()=>e.current,n=>{e.current=n,t.current.forEach((e=>e(n))),t.current=[]},()=>e.current=void 0]},c=()=>"function"==typeof window.IntersectionObserver;const d=e=>{const[t,o]=n.useState(!1),i=function(e,t){void 0===t&&(t=!1);const[o,i]=(0,n.useState)(!1);return(0,n.useEffect)((()=>{if(!c())return i(t),()=>{};const n=e.current;if(n&&c()){const e=new window.IntersectionObserver((e=>{const t=e[e.length-1];i(t.isIntersecting)}));return e.observe(n),()=>{e.disconnect()}}return()=>{}}),[e,t]),o}(e,!0);return n.useEffect((()=>{i&&o(!0)}),[i]),t};var p={root:"video-player"};((e,t,n=[])=>{e.reduce(((e,t)=>({...e,[t]:!0})),{}),n.length})(["experiments"],(e=>{let{experiments:t}=e;return t["specs.thunderbolt.shouldExportCurrentConsentPolicy"]?"WithConsentWrapper":void 0}));const h=e=>({consentPolicy:e.currentConsentPolicy,openSettingModal:()=>e.openSettingModal([])});var _=r(57061);const f=e=>(0,n.useEffect)(e,[]);function v(e,t){const o=function(e,t){void 0===t&&(t=null);const o=(0,n.useRef)(t);return(0,n.useEffect)((()=>{o.current=e}),[e]),o.current}(e,e);e!==o&&t(o)}const m="playable-cover",y="playable",E="dailymotion",g="twitch",b="youtube",w="facebook",S="vimeo",T="playable-title";function P(e){window.loadScriptPromises=window.loadScriptPromises||{};for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;onew Promise(((e,t)=>{const n=function(){const e=window.document.createElement("script");return e.defer=!0,e.async=!0,e.src=C,e}();n.addEventListener("load",(()=>e(I()))),n.addEventListener("error",t),window.document.body.insertBefore(n,window.document.body.firstChild)}));function I(){return window.Twitch}var L={name:"twitch",loader:()=>Boolean(I())?Promise.resolve(I()):(e=>"function"==typeof e.require&&"function"==typeof e.define&&e.define.amd)(window)?new Promise(((e,t)=>window.require([C],(t=>{window.Twitch=t,e(t)}),t))):O()};var A=()=>{const e=n.useRef(0),t=n.useRef([]),o=()=>{clearTimeout(e.current)},i=()=>{o(),t.current.forEach((e=>e())),e.current=setTimeout(i,1e3)};return n.useEffect((()=>{o()}),[]),{update:i,stop:o,subscribe:e=>{t.current.push(e)}}};const M=/(?:www\.|go\.)?twitch\.tv\/videos\/(\d+)($|\?)/,D=/(?:www\.|go\.)?twitch\.tv\/([a-z0-9_]+)($|\?)/;const k=(e,t)=>{const{src:o,playing:i,muted:r,volume:s=0,onReady:a,onInit:l,onDuration:c,onProgress:d,onPlay:p,onPause:h,onEnded:m,onFirstPlay:y,onFirstEnded:E,twitchParentDomains:b}=e,w=n.useRef(null),S=n.useRef(null),T=n.useRef(!1),C=n.useRef(!1),O=n.useRef(!1),[I,k]=u(),N=A(),{channelId:x,videoId:R}=(e=>{const t=D.test(e);return{channelId:t?e.match(D)[1]:"",videoId:t?"":e.match(M)[1]}})(o),[B,$]=((e,t,n)=>{const[o,i,r]=u();return f((()=>{P(L).then((o=>{t.current=o,r(new o.Player(e.current,n))})).catch((e=>{throw e}))})),[o,i]})(w,S,{video:R,channel:x,height:"100%",width:"100%",playsinline:!0,autoplay:i,muted:r,parent:b});return f((()=>{B().then((e=>{!function(e,t,n,o,i,r,s,a,l){let{onReady:u,onPlay:c,onPause:d,onEnded:p,onDuration:h,onProgress:_,onFirstPlay:f,onFirstEnded:v}=n;const{READY:m,PLAY:y,PAUSE:E,ENDED:g}=t;if(r.subscribe((()=>{null==_||_(e.getCurrentTime()||0)})),h){const t=setInterval((()=>{const n=e.getDuration();n&&(o(n),clearInterval(t))}),1e3)}e.addEventListener(m,(()=>{h&&i().then((e=>h(e))).catch((e=>{throw e})),null==u||u()})),e.addEventListener(y,(()=>{l.current||(l.current=!0,null==f||f()),s.current=!0,null==c||c(),r.update()})),e.addEventListener(E,(()=>{s.current=!1,null==d||d(),r.stop()})),e.addEventListener(g,(()=>{a.current||(a.current=!0,null==v||v()),s.current=!1,null==p||p(),r.stop()}))}(e,S.current.Player,{onReady:a,onPlay:p,onPause:h,onEnded:m,onDuration:c,onProgress:d,onFirstPlay:y,onFirstEnded:E},k,I,N,T,O,O),null==l||l(e,"twitch")})).catch((e=>{throw e}))})),((e,t,n,o)=>{let{src:i,playing:r,muted:s,volume:a}=e;v(i,(()=>{t.current=!1,n.current=!1})),v(r,(()=>o().then((e=>r?e.play():e.pause())))),v(s,(()=>o().then((e=>e.setMuted(s))))),v(a,(()=>o().then((e=>e.setVolume(a/100)))))})({src:o,playing:i,muted:r,volume:s},C,O,B),n.useImperativeHandle(t,(()=>((e,t,n)=>{const o={play:()=>e().then((e=>e.play())),pause:()=>e().then((e=>e.pause())),togglePlay:()=>n.current?o.pause():o.play(),getDuration:()=>{const e=t();return e&&e.getDuration()||0},getCurrentTime:()=>{const e=t();return e&&e.getCurrentTime()||0},seekTo:t=>e().then((e=>e.seek(t))),getVolume:()=>{const e=t();return e?100*e.getVolume():0},setVolume:t=>e().then((e=>e.setVolume(t/100))),isMuted:()=>{const e=t();return!e||e.getMuted()},isPlaying:()=>n.current,mute:()=>e().then((e=>e.setMuted(!0))),unMute:()=>e().then((e=>e.setMuted(!1)))};return o})(B,$,T))),n.createElement("div",{ref:w,className:_.classes.playerContainer,"data-player-name":"Twitch","data-testid":g})};var N=n.forwardRef(k);function x(){return x=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function B(e,t){return B=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},B(e,t)}function $(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,B(e,t)}function U(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}var V=r(95561),F=r.n(V),j=!1,H=o().createContext(null),W=function(e){return e.scrollTop},Y="unmounted",K="exited",G="entering",z="entered",q="exiting",Q=function(e){function t(t,n){var o;o=e.call(this,t,n)||this;var i,r=n&&!n.isMounting?t.enter:t.appear;return o.appearStatus=null,t.in?r?(i=K,o.appearStatus=G):i=z:i=t.unmountOnExit||t.mountOnEnter?Y:K,o.state={status:i},o.nextCallback=null,o}$(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===Y?{status:K}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==G&&n!==z&&(t=G):n!==G&&n!==z||(t=q)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,o=this.props.timeout;return e=t=n=o,null!=o&&"number"!=typeof o&&(e=o.exit,t=o.enter,n=void 0!==o.appear?o.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===G){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:F().findDOMNode(this);n&&W(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===K&&this.setState({status:Y})},n.performEnter=function(e){var t=this,n=this.props.enter,o=this.context?this.context.isMounting:e,i=this.props.nodeRef?[o]:[F().findDOMNode(this),o],r=i[0],s=i[1],a=this.getTimeouts(),l=o?a.appear:a.enter;!e&&!n||j?this.safeSetState({status:z},(function(){t.props.onEntered(r)})):(this.props.onEnter(r,s),this.safeSetState({status:G},(function(){t.props.onEntering(r,s),t.onTransitionEnd(l,(function(){t.safeSetState({status:z},(function(){t.props.onEntered(r,s)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),o=this.props.nodeRef?void 0:F().findDOMNode(this);t&&!j?(this.props.onExit(o),this.safeSetState({status:q},(function(){e.props.onExiting(o),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:K},(function(){e.props.onExited(o)}))}))}))):this.safeSetState({status:K},(function(){e.props.onExited(o)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(o){n&&(n=!1,t.nextCallback=null,e(o))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:F().findDOMNode(this),o=null==e&&!this.props.addEndListener;if(n&&!o){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],r=i[0],s=i[1];this.props.addEndListener(r,s)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===Y)return null;var t=this.props,n=t.children,i=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,R(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return o().createElement(H.Provider,{value:null},"function"==typeof n?n(e,i):o().cloneElement(o().Children.only(n),i))},t}(o().Component);function X(){}Q.contextType=H,Q.propTypes={},Q.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:X,onEntering:X,onEntered:X,onExit:X,onExiting:X,onExited:X},Q.UNMOUNTED=Y,Q.EXITED=K,Q.ENTERING=G,Q.ENTERED=z,Q.EXITING=q;var Z=Q,J=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return o=t,void((n=e).classList?n.classList.remove(o):"string"==typeof n.className?n.className=U(n.className,o):n.setAttribute("class",U(n.className&&n.className.baseVal||"",o)));var n,o}))},ee=function(e){function t(){for(var t,n=arguments.length,o=new Array(n),i=0;i{const i=ae.getPlaceholder(e,t,n,{...o,autoEncode:!0});return i?.uri&&!/^[a-z]+:/.test(i.uri)&&(i.uri=`${le}${i.uri}`),i},ce=/^[a-z]+:/;var de,pe=e=>{const{id:t,containerId:o,uri:i,alt:r,name:s="",role:a,width:l,height:u,displayMode:c,devicePixelRatio:d,quality:p,alignType:h,bgEffectName:_="",focalPoint:f,upscaleMethod:v,className:m="",crop:y,imageStyles:E={},targetWidth:g,targetHeight:b,targetScale:w,onLoad:S=(()=>{}),onError:T=(()=>{}),shouldUseLQIP:P,containerWidth:C,containerHeight:O,getPlaceholder:I,isInFirstFold:L,placeholderTransition:A,socialAttrs:M,isSEOBot:D,skipMeasure:k,lazyLoadImgExperimentOpen:N,hasAnimation:x,allowWEBPTransform:R}=e,B=n.useRef(null);let $="";const U="blur"===A,V=n.useRef(null);if(!V.current)if(I||P||L||D){const e={upscaleMethod:v,...p||{},shouldLoadHQImage:L,isSEOBot:D,hasAnimation:x,allowWEBPTransform:R};V.current=(I||ue)({fittingType:c,src:{id:i,width:l,height:u,crop:y,name:s,focalPoint:f},target:{width:C,height:O,alignment:h,htmlTag:"img"},options:e}),$=!V.current.transformed||L||D?"":"true"}else V.current={uri:void 0,css:{img:{}},attr:{img:{},container:{}},transformed:!1};const F=!D&&(I||P)&&!L&&V.current.transformed,j=n.useMemo((()=>JSON.stringify({containerId:o,...o&&{containerId:o},...h&&{alignType:h},...k&&{skipMeasure:!0},displayMode:c,...C&&{targetWidth:C},...O&&{targetHeight:O},...g&&{targetWidth:g},...b&&{targetHeight:b},...w&&{targetScale:w},isLQIP:F,isSEOBot:D,lqipTransition:A,imageData:{width:l,height:u,uri:i,name:s,displayMode:c,hasAnimation:x,...p&&{quality:p},...d&&{devicePixelRatio:d},...f&&{focalPoint:f},...y&&{crop:y},...v&&{upscaleMethod:v}}})),[o,h,k,c,O,C,g,b,w,F,D,A,l,u,i,s,p,d,f,y,v,x]),H=V.current,W=H?.uri,Y=H?.srcset,K=H.css?.img,G=`${se} ${m}`;n.useEffect((()=>{const e=B.current;S&&e?.currentSrc&&e?.complete&&S({target:B.current})}),[]);const z=H&&!H?.transformed?`max(${l}px, 100%)`:g?`${g}px`:null;return n.createElement("wow-image",{id:t,class:G,"data-image-info":j,"data-bg-effect-name":_,"data-has-ssr-src":$,"data-animate-blur":!D&&F&&U?"":void 0,style:z?{"--wix-img-max-width":z}:{}},n.createElement("img",{src:W,ref:B,alt:r||"",role:a,style:{...K,...E},onLoad:S,onError:T,...C&&{width:C},...O&&{height:O},...M,...L?{srcSet:Y?.dpr?.map((e=>ce.test(e)?e:`${le}${e}`)).join(", "),fetchpriority:"high"}:N?{loading:"lazy"}:{}}))},he=r(1835);function _e(){return _e=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{id:o,showTitle:i,title:r,poster:s,hideOverlay:a,playing:l,description:u,hasBeenPlayed:c,onPlay:d,className:p,translations:h}=e;return a||l||c?null:n.createElement("div",{onClick:d,"data-testid":m,id:"cover-"+o,className:(0,he.st)(he.classes.root,{transparentOverlay:!s},p)},s&&n.createElement(pe,t()({id:"img_"+o},s,{containerId:o,displayMode:"fill",alt:u||"",name:""})),n.createElement("div",{className:he.classes.overlay},i&&r&&n.createElement("div",{title:r,"data-testid":T,className:he.classes.title},r),n.createElement("button",{className:he.classes.playButton,"aria-label":h.playVideoAriaLabel},n.createElement(fe,null))))};const me=e=>{e.showMainUI(),e.getElement().tabIndex=0},ye=e=>{e.hideMainUI(),e.getElement().tabIndex=-1},Ee=()=>{},ge=(e,o)=>{const{id:i,src:r,showTitle:s,title:a,poster:l,hideOverlay:c,playing:d,muted:p,preload:h="none",animatePoster:m,controls:E,loop:g,texts:b={},hideMainUI:w=!1,description:S,translations:T,onReady:P=Ee,onDuration:C=Ee,onProgress:O=Ee,onPlay:I=Ee,onPause:L=Ee,onEnded:A=Ee,onFirstPlay:M=Ee,onFirstEnded:D=Ee,onInit:k=Ee}=e,N=n.useRef(null),[x,R]=(e=>{const[t,n,o]=u();return f((()=>(o((0,ne.Ue)(e)),()=>{const e=n();null==e.destroy||e.destroy()}))),[t,n]})({src:r,autoplay:Boolean(d),playsinline:!0,muted:p,fillAllSpace:!0,title:a,preload:l?h:"metadata",loop:g,texts:b,hideOverlay:!0,hideMainUI:w,preventContextMenu:!0}),[B,$]=n.useState(!1),U=()=>$(!0),V=()=>$(!1),[F,j]=n.useState(!1),H=n.useRef(!1),W=n.useRef(!1),Y=n.useRef(!1),[K,G]=n.useState(!1),[z,q]=n.useState(!1);f((()=>{x().then((e=>{ye(e),s||e.hideTitle(),e.attachToElement(N.current),((e,t,n,o,i,r)=>{let{controls:s,onReady:a,onDuration:l,onFirstPlay:u,onPlay:c,onPause:d,onFirstEnded:p,onEnded:h,onProgress:_,onFocus:f,onBlur:v}=t;e.on(ie.default.PLAY_REQUESTED,(()=>{s&&me(e),n(!0)})),e.on(ie.default.METADATA_LOADED,(()=>{null==a||a(),null==l||l(e.getDuration())})),e.on(re.default.FOCUS_ENTER_ON_PLAYER,(()=>{null==f||f()})),e.on(re.default.FOCUS_LEAVE_ON_PLAYER,(()=>{null==v||v()})),e.on(ie.default.PLAYING,(()=>{n(!0),i.current||(i.current=!0,null==u||u()),o.current=!0,null==c||c()})),e.on(ie.default.PAUSED,(()=>{o.current=!1,null==d||d()})),e.on(ie.default.ENDED,(()=>{n(!1),r.current||(r.current=!0,null==p||p()),o.current=!1,null==h||h()})),e.on(oe.default.CURRENT_TIME_UPDATED,(e=>{null==_||_(e)}))})(e,{controls:E,onReady:P,onDuration:C,onFirstPlay:M,onPlay:I,onPause:L,onFirstEnded:D,onEnded:A,onProgress:O,onFocus:U,onBlur:V},j,H,W,Y),k(e,"playable")})).catch((e=>{throw e}))})),((e,t,n,o)=>{let{src:i,playing:r,muted:s,volume:a,title:l,preload:u,showTitle:c,controls:d}=e;v(i,(async()=>{n.current=!1,o.current=!1,(await t()).setSrc(i)})),v(r,(async()=>r?(await t()).play():(await t()).pause())),v(s,(async()=>s?(await t()).mute():(await t()).unmute())),v(a,(async()=>(await t()).setVolume(a))),v(l,(async()=>(await t()).setTitle(l))),v(u,(async()=>(await t()).setPreload(u))),v(c,(async()=>c?(await t()).showTitle():(await t()).hideTitle())),v(d,(async()=>d?me(await t()):ye(await t())))})({src:r,playing:d,muted:p,title:a,loop:g,preload:h,showTitle:s,controls:E},x,W,Y),n.useImperativeHandle(o,(()=>((e,t,n)=>{const o={play:()=>new Promise((async t=>{const n=await e();n.once(ie.default.PLAYING,t),n.play()})),pause:()=>new Promise((async t=>{const n=await e();n.once(ie.default.PAUSED,t),n.pause()})),togglePlay:()=>n.current?o.pause():o.play(),stop:async()=>(await e()).reset(),getDuration:()=>{const e=t();return e&&e.getDuration()||0},getCurrentTime:()=>{const e=t();return e&&e.getCurrentTime()||0},seekTo:async t=>(await e()).seekTo(t),setVolume:async t=>(await e()).setVolume(t),getVolume:()=>{const e=t();return e&&e.getVolume()||0},isMuted:()=>{const e=t();return!e||e.isMuted},isPlaying:()=>n.current,mute:async()=>(await e()).mute(),unMute:async()=>(await e()).unmute()};return o})(x,R,H)));const Q=n.useCallback((async()=>{(await x()).play(),G(!0)}),[x]);return n.createElement(n.Fragment,null,n.createElement("div",{ref:N,"data-player-name":"Playable","data-testid":y,className:_.classes.playerContainer}),l&&"fade"===m&&n.createElement(te,{in:K,timeout:1600,classNames:{enter:_.classes.fadeEnter,enterActive:_.classes.fadeEnterActive},onEntered:()=>{q(!0)}},n.createElement("div",{className:_.classes.secondPoster},!z&&n.createElement(pe,t()({id:"poster_"+i},l,{containerId:i,displayMode:"fill",alt:S||"",name:""})))),n.createElement(ve,{id:i,showTitle:s,title:a,poster:l,hideOverlay:c,playing:d,description:S,hasBeenPlayed:F,onPlay:Q,translations:T,className:(0,_.st)(_.classes.cover,{isMobileView:e.isMobileView,playerFocused:B})}))};var be=n.forwardRef(ge);function we(e){var t,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t=0;--i){var r=this.tryEntries[i],s=r.completion;if("root"===r.tryLoc)return o("end");if(r.tryLoc<=this.prev){var a=n.call(r,"catchLoc"),l=n.call(r,"finallyLoc");if(a&&l){if(this.prev=0;--o){var i=this.tryEntries[o];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var o=n.completion;if("throw"===o.type){var i=o.arg;T(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:C(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},e}function Oe(e,t,n,o,i,r,s){try{var a=e[r](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(o,i)}function Ie(e){return function(){var t=this,n=arguments;return new Promise((function(o,i){var r=e.apply(t,n);function s(e){Oe(r,o,i,s,a,"next",e)}function a(e){Oe(r,o,i,s,a,"throw",e)}s(void 0)}))}}function Le(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ae(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},n=t.id,o=t.url,i=n||o;if(!i)throw new Error("An id or url must be passed, either in an options object or as a data-vimeo-id or data-vimeo-url attribute.");if(e=i,!isNaN(parseFloat(e))&&isFinite(e)&&Math.floor(e)==e)return"https://vimeo.com/".concat(i);if(He(i))return i.replace("http:","https:");if(n)throw new TypeError("\u201c".concat(n,"\u201d is not a valid video id."));throw new TypeError("\u201c".concat(i,"\u201d is not a vimeo.com url."))}var Ke=function(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"addEventListener",i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"removeEventListener",r="string"==typeof t?[t]:t;return r.forEach((function(t){e[o](t,n)})),{cancel:function(){return r.forEach((function(t){return e[i](t,n)}))}}},Ge=void 0!==Array.prototype.indexOf,ze="undefined"!=typeof window&&void 0!==window.postMessage;if(!(Fe||Ge&&ze))throw new Error("Sorry, the Vimeo Player API is not available in this browser.");var qe="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self?self:{}; /*! * weakmap-polyfill v2.0.4 - ECMAScript6 WeakMap polyfill * https://github.com/polygonplanet/weakmap-polyfill * Copyright (c) 2015-2021 polygonplanet * @license MIT */ !function(e){if(!e.WeakMap){var t=Object.prototype.hasOwnProperty,n=Object.defineProperty&&function(){try{return 1===Object.defineProperty({},"x",{value:1}).x}catch(e){}}(),o=function(e,t,o){n?Object.defineProperty(e,t,{configurable:!0,writable:!0,value:o}):e[t]=o};e.WeakMap=function(){function e(){if(void 0===this)throw new TypeError("Constructor WeakMap requires 'new'");if(o(this,"_id","_WeakMap"+"_"+r()+"."+r()),arguments.length>0)throw new TypeError("WeakMap iterable is not supported")}function n(e,n){if(!i(e)||!t.call(e,"_id"))throw new TypeError(n+" method called on incompatible receiver "+typeof e)}function r(){return Math.random().toString().substring(2)}return o(e.prototype,"delete",(function(e){if(n(this,"delete"),!i(e))return!1;var t=e[this._id];return!(!t||t[0]!==e)&&(delete e[this._id],!0)})),o(e.prototype,"get",(function(e){if(n(this,"get"),i(e)){var t=e[this._id];return t&&t[0]===e?t[1]:void 0}})),o(e.prototype,"has",(function(e){if(n(this,"has"),!i(e))return!1;var t=e[this._id];return!(!t||t[0]!==e)})),o(e.prototype,"set",(function(e,t){if(n(this,"set"),!i(e))throw new TypeError("Invalid value used as weak map key");var r=e[this._id];return r&&r[0]===e?(r[1]=t,this):(o(e,this._id,[e,t]),this)})),o(e,"_polyfill",!0),e}()}function i(e){return Object(e)===e}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:qe);var Qe=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){ /*! Native Promise Only v0.8.1 (c) Kyle Simpson MIT License: http://getify.mit-license.org */ var t,n,o;o=function(){var e,t,n,o=Object.prototype.toString,i="undefined"!=typeof setImmediate?function(e){return setImmediate(e)}:setTimeout;try{Object.defineProperty({},"x",{}),e=function(e,t,n,o){return Object.defineProperty(e,t,{value:n,writable:!0,configurable:!1!==o})}}catch(t){e=function(e,t,n){return e[t]=n,e}}function r(e,o){n.add(e,o),t||(t=i(n.drain))}function s(e){var t,n=typeof e;return null==e||"object"!=n&&"function"!=n||(t=e.then),"function"==typeof t&&t}function a(){for(var e=0;e0&&r(a,n))}catch(e){c.call(new p(n),e)}}}function c(e){var t=this;t.triggered||(t.triggered=!0,t.def&&(t=t.def),t.msg=e,t.state=2,t.chain.length>0&&r(a,t))}function d(e,t,n,o){for(var i=0;i=8&&i<10&&(o=JSON.stringify(o)),e.element.contentWindow.postMessage(o,e.origin)}}function ot(e,t){var n,o=[];if((t=tt(t)).event){if("error"===t.event)Je(e,t.data.method).forEach((function(n){var o=new Error(t.data.message);o.name=t.data.name,n.reject(o),et(e,t.data.method,n)}));o=Je(e,"event:".concat(t.event)),n=t.data}else if(t.method){var i=function(e,t){var n=Je(e,t);if(n.length<1)return!1;var o=n.shift();return et(e,t,o),o}(e,t.method);i&&(o.push(i),n=t.value)}o.forEach((function(t){try{if("function"==typeof t)return void t.call(e,n);t.resolve(n)}catch(e){}}))}var it=["autopause","autoplay","background","byline","color","colors","controls","dnt","height","id","interactive_params","keyboard","loop","maxheight","maxwidth","muted","playsinline","portrait","responsive","speed","texttrack","title","transparent","url","width"];function rt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return it.reduce((function(t,n){var o=e.getAttribute("data-vimeo-".concat(n));return(o||""===o)&&(t[n]=""===o?1:o),t}),t)}function st(e,t){var n=e.html;if(!t)throw new TypeError("An element must be provided");if(null!==t.getAttribute("data-vimeo-initialized"))return t.querySelector("iframe");var o=document.createElement("div");return o.innerHTML=n,t.appendChild(o.firstChild),t.setAttribute("data-vimeo-initialized","true"),t.querySelector("iframe")}function at(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return new Promise((function(o,i){if(!He(e))throw new TypeError("\u201c".concat(e,"\u201d is not a vimeo.com url."));var r="https://vimeo.com/api/oembed.json?url=".concat(encodeURIComponent(e));for(var s in t)t.hasOwnProperty(s)&&(r+="&".concat(s,"=").concat(encodeURIComponent(t[s])));var a="XDomainRequest"in window?new XDomainRequest:new XMLHttpRequest;a.open("GET",r,!0),a.onload=function(){if(404!==a.status)if(403!==a.status)try{var t=JSON.parse(a.responseText);if(403===t.domain_status_code)return st(t,n),void i(new Error("\u201c".concat(e,"\u201d is not embeddable.")));o(t)}catch(e){i(e)}else i(new Error("\u201c".concat(e,"\u201d is not embeddable.")));else i(new Error("\u201c".concat(e,"\u201d was not found.")))},a.onerror=function(){var e=a.status?" (".concat(a.status,")"):"";i(new Error("There was an error fetching the embed code from Vimeo".concat(e,".")))},a.send()}))}var lt={role:"viewer",autoPlayMuted:!0,allowedDrift:.3,maxAllowedDrift:1,minCheckInterval:.1,maxRateAdjustment:.2,maxTimeToCatchUp:1},ut=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ne(e,t)}(r,e);var t,n,o,i=Ue(r);function r(e,t){var n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=arguments.length>3?arguments[3]:void 0;return Le(this,r),De($e(n=i.call(this)),"logger",void 0),De($e(n),"speedAdjustment",0),De($e(n),"adjustSpeed",function(){var e=Ie(Ce().mark((function e(t,o){var i;return Ce().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.speedAdjustment!==o){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,t.getPlaybackRate();case 4:return e.t0=e.sent,e.t1=n.speedAdjustment,e.t2=e.t0-e.t1,e.t3=o,i=e.t2+e.t3,n.log("New playbackRate: ".concat(i)),e.next=12,t.setPlaybackRate(i);case 12:n.speedAdjustment=o;case 13:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()),n.logger=s,n.init(t,e,Pe(Pe({},lt),o)),n}return Me(r,[{key:"disconnect",value:function(){this.dispatchEvent(new Event("disconnect"))}},{key:"init",value:(o=Ie(Ce().mark((function e(t,n,o){var i,r,s,a=this;return Ce().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.waitForTOReadyState(t,"open");case 2:if("viewer"!==o.role){e.next=10;break}return e.next=5,this.updatePlayer(t,n,o);case 5:i=Ke(t,"change",(function(){return a.updatePlayer(t,n,o)})),r=this.maintainPlaybackPosition(t,n,o),this.addEventListener("disconnect",(function(){r.cancel(),i.cancel()})),e.next=14;break;case 10:return e.next=12,this.updateTimingObject(t,n);case 12:s=Ke(n,["seeked","play","pause","ratechange"],(function(){return a.updateTimingObject(t,n)}),"on","off"),this.addEventListener("disconnect",(function(){return s.cancel()}));case 14:case"end":return e.stop()}}),e,this)}))),function(e,t,n){return o.apply(this,arguments)})},{key:"updateTimingObject",value:(n=Ie(Ce().mark((function e(t,n){return Ce().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=t,e.next=3,n.getCurrentTime();case 3:return e.t1=e.sent,e.next=6,n.getPaused();case 6:if(!e.sent){e.next=10;break}e.t2=0,e.next=13;break;case 10:return e.next=12,n.getPlaybackRate();case 12:e.t2=e.sent;case 13:e.t3=e.t2,e.t4={position:e.t1,velocity:e.t3},e.t0.update.call(e.t0,e.t4);case 16:case"end":return e.stop()}}),e)}))),function(e,t){return n.apply(this,arguments)})},{key:"updatePlayer",value:(t=Ie(Ce().mark((function e(t,n,o){var i,r,s;return Ce().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=t.query(),r=i.position,s=i.velocity,"number"==typeof r&&n.setCurrentTime(r),"number"!=typeof s){e.next=25;break}if(0!==s){e.next=11;break}return e.next=6,n.getPaused();case 6:if(e.t0=e.sent,!1!==e.t0){e.next=9;break}n.pause();case 9:e.next=25;break;case 11:if(!(s>0)){e.next=25;break}return e.next=14,n.getPaused();case 14:if(e.t1=e.sent,!0!==e.t1){e.next=19;break}return e.next=18,n.play().catch(function(){var e=Ie(Ce().mark((function e(t){return Ce().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("NotAllowedError"!==t.name||!o.autoPlayMuted){e.next=5;break}return e.next=3,n.setMuted(!0);case 3:return e.next=5,n.play().catch((function(e){return console.error("Couldn't play the video from TimingSrcConnector. Error:",e)}));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 18:this.updatePlayer(t,n,o);case 19:return e.next=21,n.getPlaybackRate();case 21:if(e.t2=e.sent,e.t3=s,e.t2===e.t3){e.next=25;break}n.setPlaybackRate(s);case 25:case"end":return e.stop()}}),e,this)}))),function(e,n,o){return t.apply(this,arguments)})},{key:"maintainPlaybackPosition",value:function(e,t,n){var o=this,i=n.allowedDrift,r=n.maxAllowedDrift,s=n.minCheckInterval,a=n.maxRateAdjustment,l=n.maxTimeToCatchUp,u=1e3*Math.min(l,Math.max(s,r)),c=function(){var n=Ie(Ce().mark((function n(){var s,u,c,d,p;return Ce().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(n.t0=0===e.query().velocity,n.t0){n.next=6;break}return n.next=4,t.getPaused();case 4:n.t1=n.sent,n.t0=!0===n.t1;case 6:if(!n.t0){n.next=8;break}return n.abrupt("return");case 8:return n.t2=e.query().position,n.next=11,t.getCurrentTime();case 11:if(n.t3=n.sent,s=n.t2-n.t3,u=Math.abs(s),o.log("Drift: ".concat(s)),!(u>r)){n.next=22;break}return n.next=18,o.adjustSpeed(t,0);case 18:t.setCurrentTime(e.query().position),o.log("Resync by currentTime"),n.next=29;break;case 22:if(!(u>i)){n.next=29;break}return p=(c=u/l)<(d=a)?(d-c)/2:d,n.next=28,o.adjustSpeed(t,p*Math.sign(s));case 28:o.log("Resync by playbackRate");case 29:case"end":return n.stop()}}),n)})));return function(){return n.apply(this,arguments)}}(),d=setInterval((function(){return c()}),u);return{cancel:function(){return clearInterval(d)}}}},{key:"log",value:function(e){var t;null===(t=this.logger)||void 0===t||t.call(this,"TimingSrcConnector: ".concat(e))}},{key:"waitForTOReadyState",value:function(e,t){return new Promise((function(n){!function o(){e.readyState===t?n():e.addEventListener("readystatechange",o,{once:!0})}()}))}}]),r}(Be(EventTarget)),ct=new WeakMap,dt=new WeakMap,pt={},ht=function(){function e(t){var n=this,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Le(this,e),window.jQuery&&t instanceof jQuery&&(t.length>1&&window.console&&console.warn&&console.warn("A jQuery object with multiple elements was passed, using the first element."),t=t[0]),"undefined"!=typeof document&&"string"==typeof t&&(t=document.getElementById(t)),!function(e){return Boolean(e&&1===e.nodeType&&"nodeName"in e&&e.ownerDocument&&e.ownerDocument.defaultView)}(t))throw new TypeError("You must pass either a valid element or a valid id.");if("IFRAME"!==t.nodeName){var i=t.querySelector("iframe");i&&(t=i)}if("IFRAME"===t.nodeName&&!He(t.getAttribute("src")||""))throw new Error("The player element passed isn\u2019t a Vimeo embed.");if(ct.has(t))return ct.get(t);this._window=t.ownerDocument.defaultView,this.element=t,this.origin="*";var r=new Qe((function(e,i){if(n._onMessage=function(t){if(He(t.origin)&&n.element.contentWindow===t.source){"*"===n.origin&&(n.origin=t.origin);var o=tt(t.data);if(o&&"error"===o.event&&o.data&&"ready"===o.data.method){var r=new Error(o.data.message);return r.name=o.data.name,void i(r)}var s=o&&"ready"===o.event,a=o&&"ping"===o.method;if(s||a)return n.element.setAttribute("data-ready","true"),void e();ot(n,o)}},n._window.addEventListener("message",n._onMessage),"IFRAME"!==n.element.nodeName){var r=rt(t,o);at(Ye(r),r,t).then((function(e){var o,i,r,s=st(e,t);return n.element=s,n._originalElement=t,o=t,i=s,r=Xe.get(o),Xe.set(i,r),Xe.delete(o),ct.set(n.element,n),e})).catch(i)}}));if(dt.set(this,r),ct.set(this.element,this),"IFRAME"===this.element.nodeName&&nt(this,"ping"),pt.isEnabled){var s=function(){return pt.exit()};this.fullscreenchangeHandler=function(){pt.isFullscreen?Ze(n,"event:exitFullscreen",s):et(n,"event:exitFullscreen",s),n.ready().then((function(){nt(n,"fullscreenchange",pt.isFullscreen)}))},pt.on("fullscreenchange",this.fullscreenchangeHandler)}return this}var t;return Me(e,[{key:"callMethod",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Qe((function(o,i){return t.ready().then((function(){Ze(t,e,{resolve:o,reject:i}),nt(t,e,n)})).catch(i)}))}},{key:"get",value:function(e){var t=this;return new Qe((function(n,o){return e=je(e,"get"),t.ready().then((function(){Ze(t,e,{resolve:n,reject:o}),nt(t,e)})).catch(o)}))}},{key:"set",value:function(e,t){var n=this;return new Qe((function(o,i){if(e=je(e,"set"),null==t)throw new TypeError("There must be a value to set.");return n.ready().then((function(){Ze(n,e,{resolve:o,reject:i}),nt(n,e,t)})).catch(i)}))}},{key:"on",value:function(e,t){if(!e)throw new TypeError("You must pass an event name.");if(!t)throw new TypeError("You must pass a callback function.");if("function"!=typeof t)throw new TypeError("The callback must be a function.");0===Je(this,"event:".concat(e)).length&&this.callMethod("addEventListener",e).catch((function(){})),Ze(this,"event:".concat(e),t)}},{key:"off",value:function(e,t){if(!e)throw new TypeError("You must pass an event name.");if(t&&"function"!=typeof t)throw new TypeError("The callback must be a function.");et(this,"event:".concat(e),t)&&this.callMethod("removeEventListener",e).catch((function(e){}))}},{key:"loadVideo",value:function(e){return this.callMethod("loadVideo",e)}},{key:"ready",value:function(){var e=dt.get(this)||new Qe((function(e,t){t(new Error("Unknown player. Probably unloaded."))}));return Qe.resolve(e)}},{key:"addCuePoint",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.callMethod("addCuePoint",{time:e,data:t})}},{key:"removeCuePoint",value:function(e){return this.callMethod("removeCuePoint",e)}},{key:"enableTextTrack",value:function(e,t){if(!e)throw new TypeError("You must pass a language.");return this.callMethod("enableTextTrack",{language:e,kind:t})}},{key:"disableTextTrack",value:function(){return this.callMethod("disableTextTrack")}},{key:"pause",value:function(){return this.callMethod("pause")}},{key:"play",value:function(){return this.callMethod("play")}},{key:"requestFullscreen",value:function(){return pt.isEnabled?pt.request(this.element):this.callMethod("requestFullscreen")}},{key:"exitFullscreen",value:function(){return pt.isEnabled?pt.exit():this.callMethod("exitFullscreen")}},{key:"getFullscreen",value:function(){return pt.isEnabled?Qe.resolve(pt.isFullscreen):this.get("fullscreen")}},{key:"requestPictureInPicture",value:function(){return this.callMethod("requestPictureInPicture")}},{key:"exitPictureInPicture",value:function(){return this.callMethod("exitPictureInPicture")}},{key:"getPictureInPicture",value:function(){return this.get("pictureInPicture")}},{key:"remotePlaybackPrompt",value:function(){return this.callMethod("remotePlaybackPrompt")}},{key:"unload",value:function(){return this.callMethod("unload")}},{key:"destroy",value:function(){var e=this;return new Qe((function(t){if(dt.delete(e),ct.delete(e.element),e._originalElement&&(ct.delete(e._originalElement),e._originalElement.removeAttribute("data-vimeo-initialized")),e.element&&"IFRAME"===e.element.nodeName&&e.element.parentNode&&(e.element.parentNode.parentNode&&e._originalElement&&e._originalElement!==e.element.parentNode?e.element.parentNode.parentNode.removeChild(e.element.parentNode):e.element.parentNode.removeChild(e.element)),e.element&&"DIV"===e.element.nodeName&&e.element.parentNode){e.element.removeAttribute("data-vimeo-initialized");var n=e.element.querySelector("iframe");n&&n.parentNode&&(n.parentNode.parentNode&&e._originalElement&&e._originalElement!==n.parentNode?n.parentNode.parentNode.removeChild(n.parentNode):n.parentNode.removeChild(n))}e._window.removeEventListener("message",e._onMessage),pt.isEnabled&&pt.off("fullscreenchange",e.fullscreenchangeHandler),t()}))}},{key:"getAutopause",value:function(){return this.get("autopause")}},{key:"setAutopause",value:function(e){return this.set("autopause",e)}},{key:"getBuffered",value:function(){return this.get("buffered")}},{key:"getCameraProps",value:function(){return this.get("cameraProps")}},{key:"setCameraProps",value:function(e){return this.set("cameraProps",e)}},{key:"getChapters",value:function(){return this.get("chapters")}},{key:"getCurrentChapter",value:function(){return this.get("currentChapter")}},{key:"getColor",value:function(){return this.get("color")}},{key:"getColors",value:function(){return Qe.all([this.get("colorOne"),this.get("colorTwo"),this.get("colorThree"),this.get("colorFour")])}},{key:"setColor",value:function(e){return this.set("color",e)}},{key:"setColors",value:function(e){if(!Array.isArray(e))return new Qe((function(e,t){return t(new TypeError("Argument must be an array."))}));var t=new Qe((function(e){return e(null)})),n=[e[0]?this.set("colorOne",e[0]):t,e[1]?this.set("colorTwo",e[1]):t,e[2]?this.set("colorThree",e[2]):t,e[3]?this.set("colorFour",e[3]):t];return Qe.all(n)}},{key:"getCuePoints",value:function(){return this.get("cuePoints")}},{key:"getCurrentTime",value:function(){return this.get("currentTime")}},{key:"setCurrentTime",value:function(e){return this.set("currentTime",e)}},{key:"getDuration",value:function(){return this.get("duration")}},{key:"getEnded",value:function(){return this.get("ended")}},{key:"getLoop",value:function(){return this.get("loop")}},{key:"setLoop",value:function(e){return this.set("loop",e)}},{key:"setMuted",value:function(e){return this.set("muted",e)}},{key:"getMuted",value:function(){return this.get("muted")}},{key:"getPaused",value:function(){return this.get("paused")}},{key:"getPlaybackRate",value:function(){return this.get("playbackRate")}},{key:"setPlaybackRate",value:function(e){return this.set("playbackRate",e)}},{key:"getPlayed",value:function(){return this.get("played")}},{key:"getQualities",value:function(){return this.get("qualities")}},{key:"getQuality",value:function(){return this.get("quality")}},{key:"setQuality",value:function(e){return this.set("quality",e)}},{key:"getRemotePlaybackAvailability",value:function(){return this.get("remotePlaybackAvailability")}},{key:"getRemotePlaybackState",value:function(){return this.get("remotePlaybackState")}},{key:"getSeekable",value:function(){return this.get("seekable")}},{key:"getSeeking",value:function(){return this.get("seeking")}},{key:"getTextTracks",value:function(){return this.get("textTracks")}},{key:"getVideoEmbedCode",value:function(){return this.get("videoEmbedCode")}},{key:"getVideoId",value:function(){return this.get("videoId")}},{key:"getVideoTitle",value:function(){return this.get("videoTitle")}},{key:"getVideoWidth",value:function(){return this.get("videoWidth")}},{key:"getVideoHeight",value:function(){return this.get("videoHeight")}},{key:"getVideoUrl",value:function(){return this.get("videoUrl")}},{key:"getVolume",value:function(){return this.get("volume")}},{key:"setVolume",value:function(e){return this.set("volume",e)}},{key:"setTimingSrc",value:(t=Ie(Ce().mark((function e(t,n){var o,i=this;return Ce().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}throw new TypeError("A Timing Object must be provided.");case 2:return e.next=4,this.ready();case 4:return o=new ut(this,t,n),nt(this,"notifyTimingObjectConnect"),o.addEventListener("disconnect",(function(){return nt(i,"notifyTimingObjectDisconnect")})),e.abrupt("return",o);case 8:case"end":return e.stop()}}),e,this)}))),function(e,n){return t.apply(this,arguments)})}]),e}();Fe||(pt=function(){var e=function(){for(var e,t=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],n=0,o=t.length,i={};n0&&void 0!==arguments[0]?arguments[0]:document,t=[].slice.call(e.querySelectorAll("[data-vimeo-id], [data-vimeo-url]")),n=function(e){"console"in window&&console.error&&console.error("There was an error creating an embed: ".concat(e))};t.forEach((function(e){try{if(null!==e.getAttribute("data-vimeo-defer"))return;var t=rt(e);at(Ye(t),t,e).then((function(t){return st(t,e)})).catch(n)}catch(e){n(e)}}))}(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;window.VimeoPlayerResizeEmbeds_||(window.VimeoPlayerResizeEmbeds_=!0,window.addEventListener("message",(function(t){if(He(t.origin)&&t.data&&"spacechange"===t.data.event)for(var n=e.querySelectorAll("iframe"),o=0;o0&&void 0!==arguments[0]?arguments[0]:document;window.VimeoSeoMetadataAppended||(window.VimeoSeoMetadataAppended=!0,window.addEventListener("message",(function(t){if(He(t.origin)){var n=tt(t.data);if(n&&"ready"===n.event)for(var o=e.querySelectorAll("iframe"),i=0;i0&&void 0!==arguments[0]?arguments[0]:document;if(!window.VimeoCheckedUrlTimeParam){window.VimeoCheckedUrlTimeParam=!0;var t=function(e){"console"in window&&console.error&&console.error("There was an error getting video Id: ".concat(e))};window.addEventListener("message",(function(n){if(He(n.origin)){var o=tt(n.data);if(o&&"ready"===o.event)for(var i=e.querySelectorAll("iframe"),r=function(){var e=i[s],o=e.contentWindow===n.source;if(We(e.src)&&o){var r=new ht(e);r.getVideoId().then((function(e){var t=new RegExp("[?&]vimeo_t_".concat(e,"=([^&#]*)")).exec(window.location.href);if(t&&t[1]){var n=decodeURI(t[1]);r.setCurrentTime(n)}})).catch(t)}},s=0;sPromise.resolve({Player:_t})};const vt="play",mt="pause",yt="ended",Et="volumechange",gt="timeupdate";const bt=(e,t)=>{const{src:o,playing:i,muted:r,loop:s,showTitle:a,volume:l=0,onReady:c,onInit:d,onDuration:p,onProgress:h,onPlay:m,onPause:y,onEnded:E,onFirstPlay:g,onFirstEnded:b,onError:w}=e,T=n.useRef(null),C=n.useRef(0),O=n.useRef(0),I=n.useRef(l),L=n.useRef(!1),A=n.useRef(!1),M=n.useRef(!1),D=((e,t)=>{const[n,,o]=u();return f((()=>(P(ft).then((n=>{o(new n.Player(e.current,t))})).catch((e=>{throw e})),()=>{n().then((e=>e.destroy())).catch((e=>{throw e}))}))),n})(T,{url:o,autoplay:i,muted:r,loop:s,title:a});return f((()=>{D().then((e=>{e.ready().then((()=>{null==c||c(),e.getDuration().then((e=>{C.current=e,null==p||p(e)})).catch((e=>{throw e}))})).catch((e=>{throw e})),function(e,t,n,o,i,r,s){let{onProgress:a,onPlay:l,onPause:u,onEnded:c,onFirstPlay:d,onFirstEnded:p,onError:h}=t;e.on(vt,(()=>{s.current||(s.current=!0,null==d||d()),i.current=!0,null==l||l()})),e.on(mt,(()=>{i.current=!1,null==u||u()})),e.on(yt,(()=>{r.current||(r.current=!0,null==p||p()),i.current=!1,null==c||c()})),e.on(Et,(e=>{let{volume:t}=e;o.current=100*t})),e.on(gt,(e=>{let{seconds:t}=e;n.current=t,null==a||a(t)})),h&&e.on("error",h)}(e,{onProgress:h,onPlay:m,onPause:y,onEnded:E,onFirstPlay:g,onFirstEnded:b,onError:w},O,I,L,M,A),null==d||d(e,"vimeo")})).catch((e=>{throw e}))})),((e,t,n,o)=>{let{src:i,playing:r,muted:s,volume:a}=e;v(i,(()=>{t.current=!1,n.current=!1})),v(r,(()=>o().then((e=>r?e.play():e.pause())))),v(s,(()=>o().then((e=>e.setVolume(s?0:1))))),v(a,(()=>o().then((e=>e.setVolume(a/100)))))})({src:o,playing:i,muted:r,volume:l},A,M,D),n.useImperativeHandle(t,(()=>((e,t,n,o,i)=>{const r={play:()=>e().then((e=>e.play())),pause:()=>e().then((e=>e.pause())),togglePlay:()=>t.current?r.pause():r.play(),getDuration:()=>n.current,getCurrentTime:()=>o.current,seekTo:t=>e().then((e=>e.setCurrentTime(t))),getVolume:()=>i.current,setVolume:t=>e().then((e=>e.setVolume(t/100))),isMuted:()=>0===i.current,isPlaying:()=>t.current,mute:()=>e().then((e=>e.setVolume(0))),unMute:()=>e().then((e=>e.setVolume(1)))};return r})(D,L,C,O,I))),n.createElement("div",{ref:T,"data-player-name":"Vimeo","data-testid":S,className:Se(_.classes.playerContainer,_.classes.vimeoContainer)})};var wt=n.forwardRef(bt);function St(){return window.YT}var Tt={name:"youtube",loader:()=>Boolean(St())?Promise.resolve(St()):new Promise((e=>{const t=function(){const e=window.document.createElement("script");return e.defer=!0,e.async=!0,e.src="https://www.youtube.com/iframe_api",e}(),n=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=()=>{n&&n(),e(St())},window.document.body.insertBefore(t,window.document.body.firstChild)}))};const Pt=/(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})/,Ct=e=>new Promise((t=>{const n=()=>{e.playVideo?t(e):setTimeout(n,50)};n()}));function Ot(e,t,n,o,i,r,s){let{onPlay:a,onPause:l,onEnded:u,onProgress:c,onFirstPlay:d,onFirstEnded:p}=n;return o.subscribe((()=>{null==c||c(e().getCurrentTime()||0)})),e=>{let{data:n}=e;const{PLAYING:c,PAUSED:h,ENDED:_}=t();n===c&&(s.current||(s.current=!0,null==d||d()),i.current=!0,null==a||a(),o.update()),n===h&&(i.current=!1,null==l||l(),o.stop()),n===_&&(r.current||(r.current=!0,null==p||p()),i.current=!1,null==u||u(),o.stop())}}const It=(e,t)=>{const{src:o,playing:i,muted:r,loop:s,controls:a,volume:l=0,onReady:c,onInit:d,onDuration:p,onProgress:h,onPlay:m,onPause:y,onEnded:E,onFirstPlay:g,onFirstEnded:w,onError:S}=e,T=n.useRef(null),C=n.useRef(null),O=n.useRef(!1),I=n.useRef(!1),L=n.useRef(!1),M=A(),D=(e=>e.match(Pt)[1])(o),[k,N]=((e,t,n)=>{const[o,i,r]=u();return f((()=>{P(Tt).then((o=>{t.current=o,r(new o.Player(e.current,n))})).catch((e=>{throw e}))})),[()=>o().then(Ct),i]})(C,T,{width:"100%",height:"100%",videoId:D,playerVars:{autoplay:i?1:0,mute:r?1:0,controls:a?1:0,loop:s?1:0,origin:"undefined"!=typeof window&&window.location&&window.location.origin,playsinline:1,...s&&{playlist:D}},events:{onReady:()=>{null==c||c(),null==p||p(N().getDuration())},onStateChange:Ot((()=>N()),(()=>T.current.PlayerState),{onPlay:m,onPause:y,onEnded:E,onProgress:h,onFirstPlay:g,onFirstEnded:w},M,O,L,I),onError:S}});return f((()=>{k().then((e=>{null==d||d(e,"youtube")})).catch((e=>{throw e}))})),((e,t,n,o)=>{let{src:i,playing:r,muted:s,volume:a}=e;v(i,(()=>{t.current=!1,n.current=!1})),v(r,(()=>o().then((e=>r?e.playVideo():e.pauseVideo())))),v(s,(()=>o().then((e=>s?e.mute():e.unMute())))),v(a,(()=>o().then((e=>e.setVolume(a)))))})({src:o,playing:i,muted:r,volume:l},I,L,k),n.useImperativeHandle(t,(()=>((e,t,n)=>{const o={play:()=>e().then((e=>{e.playVideo()})),pause:()=>e().then((e=>{e.pauseVideo()})),togglePlay:()=>n.current?o.pause():o.play(),stop:()=>e().then((e=>{e.stopVideo()})),getDuration:()=>{const e=t();return e&&e.getDuration?e.getDuration():0},getCurrentTime:()=>{const e=t();return e&&e.getCurrentTime?e.getCurrentTime():0},seekTo:t=>e().then((e=>{e.seekTo(t)})),getVolume:()=>{const e=t();return e&&e.getVolume?e.getVolume():0},setVolume:t=>e().then((e=>{e.setVolume(t)})),isMuted:()=>{const e=t();return!e||!e.isMuted||e.isMuted()},isPlaying:()=>n.current,mute:()=>e().then((e=>{e.mute()})),unMute:()=>e().then((e=>{e.unMute()}))};return o})(k,N,O))),n.createElement("div",{className:_.classes.playerContainer,"data-player-name":"YouTube","data-testid":b},n.createElement("div",{ref:C}))};var Lt=n.forwardRef(It);function At(){return window.DM}var Mt={name:"dailyMotion",loader:()=>Boolean(At())?Promise.resolve(At()):new Promise((e=>{const t=window.dmAsyncInit;window.dmAsyncInit=()=>{t&&t(),e(At())};const n=function(){const e=window.document.createElement("script");return e.defer=!0,e.async=!0,e.src="https://api.dmcdn.net/all.js",e}();n.addEventListener("load",(()=>e(At()))),window.document.body.insertBefore(n,window.document.body.firstChild)}))};const Dt=/^(?:(?:https?):)?(?:\/\/)?(?:www\.)?(?:(?:dailymotion\.com(?:\/embed)?\/video)|dai\.ly)\/([a-zA-Z0-9]+)(?:_[\w_-]+)?(?:\?.*)?$/;function kt(e,t,n,o,i,r){let{onReady:s,onPlay:a,onPause:l,onEnded:u,onDuration:c,onProgress:d,onFirstPlay:p,onFirstEnded:h,onError:_}=t;return n.subscribe((()=>{null==d||d(e().currentTime||0)})),{apiready:()=>null==s?void 0:s(),durationChange:()=>null==c?void 0:c(e().duration),playing:()=>{r.current||(r.current=!0,null==p||p()),o.current=!0,null==a||a(),n.update()},pause:()=>{o.current=!1,null==l||l(),n.stop()},video_end:()=>{i.current||(i.current=!0,null==h||h()),o.current=!1,null==u||u(),n.stop()},error:e=>_&&_(e)}}const Nt=(e,t)=>{const{src:o,playing:i,muted:r,controls:s,volume:a=0,onReady:l,onInit:c,onDuration:d,showTitle:p,onProgress:h,onPlay:m,onPause:y,onEnded:g,onFirstPlay:b,onFirstEnded:w,onError:S}=e,T=n.useRef(null),C=n.useRef(!1),O=n.useRef(!1),I=n.useRef(!1),L=A(),M=(e=>e.match(Dt)[1])(o),[D,k]=((e,t)=>{const[n,o,i]=u();return f((()=>{P(Mt).then((n=>{i(new n.player(e.current,t))})).catch((e=>{throw e}))})),[n,o]})(T,{width:"100%",height:"100%",video:M,params:{controls:s,autoplay:i,mute:r,"ui-start-screen-info":p,origin:"undefined"!=typeof window&&window.location&&window.location.origin},events:kt((()=>k()),{onReady:l,onPlay:m,onPause:y,onEnded:g,onDuration:d,onProgress:h,onFirstPlay:b,onFirstEnded:w,onError:S},L,C,I,O)});return f((()=>{D().then((e=>{null==c||c(e,"dailymotion")})).catch((e=>{throw e}))})),((e,t,n,o)=>{let{src:i,playing:r,muted:s,volume:a,controls:l}=e;v(i,(()=>{t.current=!1,n.current=!1})),v(r,(()=>o().then((e=>r?e.play():e.pause())))),v(s,(()=>o().then((e=>e.setMuted(s))))),v(a,(()=>o().then((e=>e.setVolume(a/100))))),v(l,(()=>o().then((e=>e.setControls(l)))))})({src:o,playing:i,muted:r,volume:a,controls:s},O,I,D),n.useImperativeHandle(t,(()=>((e,t,n)=>{const o={play:()=>e().then((e=>e.play())),pause:()=>e().then((e=>e.pause())),togglePlay:()=>n.current?o.pause():o.play(),getDuration:()=>{const e=t();return e&&e.duration||0},getCurrentTime:()=>{const e=t();return e&&e.currentTime||0},seekTo:t=>e().then((e=>e.setCurrentTime(t))),getVolume:()=>{const e=t();return e?100*e.volume:0},setVolume:t=>e().then((e=>e.setVolume(t/100))),isMuted:()=>{const e=t();return!e||e.muted},isPlaying:()=>n.current,mute:()=>e().then((e=>e.setMuted(!0))),unMute:()=>e().then((e=>e.setMuted(!1)))};return o})(D,k,C))),n.createElement("div",{className:_.classes.playerContainer,"data-player-name":"DailyMotion","data-testid":E},n.createElement("div",{ref:T}))};function xt(){return window.FB}var Rt={name:"facebook",loader:e=>Boolean(xt())?Promise.resolve(xt()):new Promise((t=>{const n=window.fbAsyncInit;window.fbAsyncInit=()=>{n&&n(),t(xt())};const o=window.document.createDocumentFragment();o.appendChild(function(){const e=document.createElement("div");return e.id="fb-root",e.style.display="none",e}()),o.appendChild(function(e){let{language:t,appId:n,version:o}=e;const i=window.document.createElement("script");return i.defer=!0,i.async=!0,i.crossOrigin="anonymous",i.src="//connect.facebook.net/"+t+"/sdk.js#xfbml=1&appId="+n+"&version="+o,i}(e)),window.document.body.insertBefore(o,window.document.body.firstChild)}))};const Bt="startedPlaying",$t="paused",Ut="finishedPlaying",Vt="error",Ft={appId:"",language:"en_US",version:"v2.4"},jt=(e,t,n,o)=>{e.init({appId:"",xfbml:!0,version:"v2.5"}),e.Event.subscribe("xfbml.ready",(e=>{Ht({msg:e,setPlayer:t,config:n})})),e.Event.subscribe("iframeplugin:create",(()=>Wt(o)))},Ht=e=>{let{msg:t,setPlayer:n,config:o}=e;const{playerId:i}=o;"video"===t.type&&t.id===i&&n(t.instance)},Wt=e=>{if(!e.current)return;const t=e.current.querySelector("iframe");t&&t.setAttribute("allow","autoplay; encrypted-media")};const Yt=(e,t)=>{const{src:o,playing:r,muted:s,volume:a=0,containerDimensions:l,onInit:c,onProgress:d,controls:p,onError:h,onPlay:m,onPause:y,onFirstPlay:E,onFirstEnded:g,onEnded:b,isEditor:S,withFacebookDimensionsExperiment:T}=e,C="facebook-"+e.id,O=n.useRef(!1),I=n.useRef(null),L=n.useRef(null),M=n.useRef(!1),D=n.useRef(!1),k=A(),[N,x]=n.useState({width:"0",height:"0"}),R=n.useCallback((()=>{T&&I.current&&x({width:I.current.offsetWidth.toString(),height:I.current.offsetHeight.toString()})}),[T]);n.useEffect((()=>{R()}),[S,R]);const B=n.useCallback(i((()=>{S&&R()}),100),[S]);(e=>{let{callback:t,ref:o,elem:i}=e;(0,n.useEffect)((()=>{const e=new ResizeObserver(t);return null!=o&&o.current&&e.observe(o.current),i&&e.observe(i),()=>{e.disconnect()}}),[o,i,t])})({ref:I,callback:B}),n.useEffect((()=>{P(Rt,Ft).then((e=>{T&&I.current&&e.XFBML.parse(I.current)})).catch((e=>{throw e}))}),[N,T]);const[$,U]=((e,t)=>{const[n,o,i]=u();return f((()=>{const n=P(Rt,Ft);return n.then((n=>{jt(n,i,t,e)})).catch((e=>{throw e})),()=>{n.then((e=>{e.Event.unsubscribe("xfbml.ready",Ht),e.Event.unsubscribe("iframeplugin:create",Wt)})).catch((e=>{throw e}))}})),[n,o]})(L,{playerId:C});return f((()=>{$().then((e=>{!function(e,t,n,o,i,r){let{onPlay:s,onPause:a,onFirstPlay:l,onFirstEnded:u,onEnded:c,onProgress:d,onError:p}=t;n.subscribe((()=>{null==d||d(e().getCurrentPosition()||0)})),e().subscribe(Bt,(()=>{i.current||(i.current=!0,null==l||l()),r.current=!0,null==s||s(),n.update()})),e().subscribe($t,(()=>{r.current=!1,null==a||a(),n.stop()})),e().subscribe(Ut,(()=>{o.current||(o.current=!0,null==u||u()),r.current=!1,null==c||c(),n.stop()})),p&&e().subscribe(Vt,p)}((()=>U()),{onPlay:m,onPause:y,onFirstPlay:E,onFirstEnded:g,onEnded:b,onProgress:d,onError:h},k,D,M,O),s||e.unmute(),r&&e.play(),null==c||c(e,"facebook")})).catch((e=>{throw e}))})),((e,t,n,o)=>{let{src:i,playing:r,muted:s,volume:a}=e;v(i,(()=>{t.current=!1,n.current=!1})),v(r,(()=>o().then((e=>r?e.play():e.pause())))),v(s,(()=>o().then((e=>s?e.mute():e.unmute())))),v(a,(()=>o().then((e=>e.setVolume(a/100)))))})({src:o,playing:r,muted:s,volume:a},M,D,$),n.useImperativeHandle(t,(()=>((e,t,n)=>{const o={play:()=>e().then((e=>e.play())),pause:()=>e().then((e=>e.pause())),togglePlay:()=>n.current?o.pause():o.play(),getDuration:()=>{const e=t();return e&&e.getDuration()||0},getCurrentTime:()=>{const e=t();return e&&e.getCurrentPosition()||0},seekTo:t=>e().then((e=>e.seek(t))),getVolume:()=>{const e=t();return e&&100*e.getVolume()||0},setVolume:t=>e().then((e=>e.setVolume(t/100))),isMuted:()=>0===o.getVolume(),isPlaying:()=>n.current,mute:()=>e().then((e=>e.mute())),unMute:()=>e().then((e=>e.unmute()))};return o})($,U,O))),n.createElement("div",{ref:I,className:_.classes.facebookContainer},n.createElement("div",{ref:L,className:"fb-video","data-player-name":"Facebook",id:C,"data-href":o,"data-autoplay":r?"true":"false","data-allowfullscreen":"true","data-controls":p?"true":"false","data-width":T?N.width:l.width,"data-height":T?N.height:l.height,"data-testid":w}))};var Kt={dailymotion:n.forwardRef(Nt),facebook:n.forwardRef(Yt),playable:be,vimeo:wt,twitch:N,youtube:Lt};const Gt=e=>"string"==typeof e,zt=/^(?:(?:https?):)?(?:\/\/)?(?:www\.)?(?:(?:dailymotion\.com(?:\/embed)?\/video)|dai\.ly)\/([a-zA-Z0-9]+)(?:_[\w_-]+)?(?:\?.*)?$/,qt=/facebook\.com\/([^/?].+\/)?video(s|\.php)[/?].*$/,Qt=/\.(mp4|og[gv]|webm|mov|m4v)($|\?)/i,Xt=/(?:www\.|go\.)?twitch\.tv\/videos\/(\d+)($|\?)/,Zt=/(?:www\.|go\.)?twitch\.tv\/([a-z0-9_]+)($|\?)/,Jt=/vimeo\.com\/.+/,en=/(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})/,tn={dailymotion:e=>Gt(e)&&zt.test(e),facebook:e=>Gt(e)&&qt.test(e),playable:e=>{return Gt(e)?Qt.test(e):(t=e,!!Array.isArray(t)&&e.some((e=>Qt.test(e))));var t},twitch:e=>Gt(e)&&(Xt.test(e)||Zt.test(e)),vimeo:e=>Gt(e)&&Jt.test(e),youtube:e=>Gt(e)&&en.test(e)},nn=(e,o)=>{const{onMouseEnter:i,onMouseLeave:r,reducedMotion:s,className:c,customClassNames:h=[],isConsentPolicyActive:f}=e,v=!s&&e.autoplay,[m,y]=n.useState(0),[E,g]=n.useState(!1),b=(e=>{for(const t in tn){const n=t;if(tn[n](e))return n}return"playable"})(e.src),w="playable"===b,S=Kt[b],T=n.useCallback((()=>y(m+1)),[m]),P=n.useRef(null),C=n.useRef(null),[O,I,L,A]=u(),M=t=>{if(!e.onStateUpdated)return;const n=t||{},o=I(),i={...o?{isPlaying:o.isPlaying(),duration:Number(o.getDuration())}:{},...n};e.onStateUpdated({type:"onStateUpdated",state:i})};n.useImperativeHandle(o,(()=>({resetPlayerRef:()=>A(),play:()=>(g(!0),O().then((e=>e.play()))),pause:()=>O().then((e=>e.pause())),stop:()=>O().then((e=>e.stop?e.stop():T())),togglePlay:()=>(g(!0),O().then((e=>e.togglePlay()))),mute:()=>(M({isMuted:!0}),O().then((e=>e.mute()))),unmute:()=>(M({isMuted:!1}),O().then((e=>e.unMute()))),seek:e=>O().then((t=>t.seekTo(e))),setVolume:e=>{M({volume:e}),O().then((t=>t.setVolume(e))).catch((e=>{throw e}))}})));const D=d(P),k=v||D||E,N=((e,t)=>e?{}:t)("playable"!==b&&f,{id:e.id,...a(e),className:(0,_.st)(_.classes.root,c,l(p.root,...h))});return k?n.createElement("div",t()({},N,{ref:P,onMouseEnter:i,onMouseLeave:r}),n.createElement(S,t()({key:"player-"+e.src+"-"+m},e,w&&e.playableConfig,{playing:v,onProgress:t=>{const n=I(),o=n.getVolume(),i=n.isMuted();M({currentTime:t,volume:o,isMuted:Boolean(i)}),null==e.onProgress||e.onProgress({type:"onProgress"})},onDuration:e=>{M({duration:e})},onInit:()=>{L(C.current),null==e.onPlayerInitialized||e.onPlayerInitialized({type:"onPlayerInitialized"})},onPlay:()=>{M({isPlaying:!0}),null==e.onPlay||e.onPlay({type:"onPlay"})},onPause:()=>{M({isPlaying:!1}),null==e.onPause||e.onPause({type:"onPause"})},onEnded:()=>{M({isPlaying:!1}),null==e.onEnded||e.onEnded({type:"onEnded"})},ref:C}))):n.createElement("div",{id:e.id,className:(0,_.st)(_.classes.root),ref:P})};const on=e=>e.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase()));var rn;const sn={VideoPlayer:{component:n.forwardRef(nn),controller:(rn=e=>{let{stateValues:t,mapperProps:n}=e;const{reducedMotion:o}=t;return{...n,reducedMotion:o,...h(t)}},{useComponentProps:(e,t,n)=>{const o=(e=>({...e,updateStyles:t=>{const n=Object.entries(t).reduce(((e,t)=>{let[n,o]=t;return{...e,[(i=n,i.startsWith("--")?n:on(n))]:void 0===o?null:o};var i}),{});e.updateStyles(n)}}))(n);return rn({mapperProps:e,stateValues:t,controllerUtils:o})}})}}}(),s}()})); //# sourceMappingURL=https://static.parastorage.com/services/editor-elements-library/dist/thunderbolt/rb_wixui.thunderbolt[VideoPlayer].c1bab3ad.bundle.min.js.map